Disclosure of Invention
In view of the above, the present invention provides a file processing method and an electronic device, so as to solve the problems that in the prior art, in the process of copying source files stored in a plurality of source paths, multiple accesses to a target location are required, the operation is complex, and time is wasted, and the specific scheme is as follows:
a method of file processing, comprising:
executing a first action when the first file is stored from the original position to the target position;
recording the target position and the first action;
and when the second file is found, executing the first action, and storing the second file to the target position.
Further, when the first file is stored from the original position to the target position, a first action is executed, specifically:
executing a received first storage instruction sent to the selected first file, wherein the first storage instruction is as follows: a first copy instruction or a first cut instruction;
and moving the interface to the target position, executing the first paste instruction, and executing the first action.
Further, when the first file is stored from the original position to the target position, a first action is executed, specifically:
executing a received first storage instruction sent to the selected first file, wherein the first storage instruction is as follows: a first copy instruction or a first cut instruction;
performing a first action;
and moving the interface to the target position, and executing a first paste instruction.
Further, when the second file is found, the first action is executed, specifically:
and when the second file is found, selecting the second file and executing the first action.
Further, when the second file is found, the first action is executed, specifically:
when the second file is found, receiving a second storage instruction aiming at the second file, and executing the first action, wherein the second storage instruction is as follows: a second copy instruction or a second cut instruction.
An electronic device, comprising: a memory and a processor, wherein:
the processor is used for executing a first action when the first file is stored from the original position to the target position;
the memory is used for recording the target position and the first action;
and the processor is also used for executing the first action and storing the second file to the target position when the second file is found.
Further, when the processor stores the first file from the home position to the target position, the processor executes a first action, specifically:
the processor executes a received first storage instruction sent to the selected first file, the first storage instruction is a first copying instruction or a first cutting instruction, the interface is moved to a target position, a first pasting instruction is executed, and meanwhile, a first action is executed.
Further, when the processor stores the first file from the home position to the target position, the processor executes a first action, specifically:
the processor executes a received first storage instruction sent to the selected first file, wherein the first storage instruction is as follows: the first copying instruction or the first cutting instruction executes a first action, moves the interface to a target position and executes a first pasting instruction.
Further, when the processor finds the second file, the processor executes a first action, specifically:
and when finding a second file, the processor selects the second file and executes the first action.
Further, when the processor finds the second file, the processor executes a first action, specifically:
when finding a second file, the processor receives a second storage instruction for the second file, and executes the first action, where the second storage instruction is: a second copy instruction or a second cut instruction.
According to the technical scheme, the file processing method and the electronic device disclosed by the application execute the first action and record the target position and the first action when the first file is stored to the target position from the original position, and execute the first action and store the second file to the target position when the second file is found. According to the scheme, the first action is executed when the first file is stored to the target position through recording, and after the second file needing to be stored is found, the first action is executed, so that the second file can be stored to the target position, namely, the file can be stored to the target position only by executing the first action, multiple times of entering and exiting of the target position are avoided, the operation of storing a plurality of files to the target position can be realized only by entering and exiting the target position once, the operation is simple, and the time is saved.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention discloses a file processing method, the flow chart of which is shown in figure 1, comprising the following steps:
step S11, when the first file is stored from the original position to the target position, executing a first action;
storing the first file from the home position to the target position may specifically be: copying the first file from its original storage location to a target location; the following steps can be also included: and moving the first file from the original storage position to the target position, namely cutting the first file from the original storage position to the target position.
Executing a first action, which may be specifically: performing a first action in storing the first file from the home position to the target position; the following steps can be also included: in the process of storing the first file from the original position to the target position, the first action is decomposed into a first sub-action and a second sub-action, the first sub-action is executed when the first file is selected in the original storage position, and the second sub-action is executed when the first file is stored in the target position.
Step S12, recording the target position and the first action;
and recording the target position and the first action so as to execute the first action when other files are stored to the target position subsequently, and realizing the first action without searching the path of the target position again.
And step S13, when the second file is found, executing a first action, and storing the second file to a target position.
Specifically, the following may be mentioned: when the second file is found, the second file is selected, and the first action is executed at the original storage position of the second file, so that the second file can be copied or moved to the target position; when the first action comprises: and when the first sub-action and the second sub-action are carried out, after the second file is selected, the first sub-action is executed, and then the second sub-action is executed, so that the second file is copied or moved to the target position.
In the file processing method disclosed in this embodiment, when the first file is stored from the original position to the target position, the first action is executed, the target position and the first action are recorded, and when the second file is found, the first action is executed, and the second file is stored to the target position. According to the scheme, the first action is executed when the first file is stored to the target position through recording, and after the second file needing to be stored is found, the first action is executed, so that the second file can be stored to the target position, namely, the file can be stored to the target position only by executing the first action, multiple times of entering and exiting of the target position are avoided, the operation of storing a plurality of files to the target position can be realized only by entering and exiting the target position once, the operation is simple, and the time is saved.
The embodiment discloses a file processing method, a flowchart of which is shown in fig. 2, and the method comprises the following steps:
step S21, executing a first storage instruction sent to the selected first file, where the first storage instruction is: a first copy instruction or a first cut instruction;
and sending a first storage instruction aiming at the first file, wherein the selection of the first file can be clicking the first file or executing a certain preset action aiming at the first file to realize the selection of the first file.
Step S22, moving the interface to the target position, executing a first paste instruction, and simultaneously executing a first action;
when the first copying instruction or the first cutting instruction is executed, the display of the electronic equipment displays an interface where the original storage position of the first file is located, and after the interface where the original storage position of the first file is located is moved to the interface where the target position is located from the interface where the original storage position of the first file, the first pasting instruction is executed, so that the first file is copied to the target position or moved to the target position.
In the process of copying or moving the first file to the target location, the first action is executed, and may be: executing the first action when executing the first paste instruction, or executing the first action after executing the first paste instruction; the method can also comprise the following steps: in the process of storing the first file from the original position to the target position, the first action is decomposed into a first sub-action and a second sub-action, the first sub-action is executed when the first file is selected in the original storage position, and the second sub-action is executed when the first file is stored in the target position.
Step S23, recording the target position and the first action;
and step S24, when the second file is found, executing a first action, and storing the second file to a target position.
In the file processing method disclosed in this embodiment, when the first file is stored from the original position to the target position, the first action is executed, the target position and the first action are recorded, and when the second file is found, the first action is executed, and the second file is stored to the target position. According to the scheme, the first action is executed when the first file is stored to the target position through recording, and after the second file needing to be stored is found, the first action is executed, so that the second file can be stored to the target position, namely, the file can be stored to the target position only by executing the first action, multiple times of entering and exiting of the target position are avoided, the operation of storing a plurality of files to the target position can be realized only by entering and exiting the target position once, the operation is simple, and the time is saved.
The embodiment discloses a file processing method, a flowchart of which is shown in fig. 3, and the method comprises the following steps:
step S31, executing a first storage instruction sent to the selected first file, where the first storage instruction is: a first copy instruction or a first cut instruction;
step S32, executing a first action;
after executing the first storage instruction issued for the first file, a first action is executed, which may be specifically: the operation at a certain moment may be a continuous operation.
When the first action is taken as an action at a certain moment, namely after a first storage instruction is executed for a first file, the first action is executed, and when the interface is moved to the target position, the first action is executed;
when the first action is a continuous action, namely after the first storage instruction is executed for the first file, the first action is started to be executed until the interface is moved to the target position or the first paste instruction is executed, and the first action is not executed completely.
Step S33, moving the interface to a target position, and executing a first paste instruction;
step S34, recording the target position and the first action;
and step S35, when the second file is found, executing a first action, and storing the second file to a target position.
When the second file is found, executing a first action, which may specifically be: when the second file is found, receiving a second storage instruction aiming at the second file, and executing a first action, wherein the second storage instruction is as follows: a second copy instruction or a second cut instruction, that is, after receiving the second storage instruction, executing the first action, that is, the first action only implements pasting the second file to the target location;
the method can also comprise the following steps: when the second file is found, the second file is selected, the first action is directly executed, and the second file can be stored in the target position, so that the second file can be copied and pasted to the target position or the second file can be cut and pasted to the target position by the first action.
In the file processing method disclosed in this embodiment, when the first file is stored from the original position to the target position, the first action is executed, the target position and the first action are recorded, and when the second file is found, the first action is executed, and the second file is stored to the target position. According to the scheme, the first action is executed when the first file is stored to the target position through recording, and after the second file needing to be stored is found, the first action is executed, so that the second file can be stored to the target position, namely, the file can be stored to the target position only by executing the first action, multiple times of entering and exiting of the target position are avoided, the operation of storing a plurality of files to the target position can be realized only by entering and exiting the target position once, the operation is simple, and the time is saved.
The embodiment discloses an electronic device, a schematic structural diagram of which is shown in fig. 4, and the electronic device includes:
a memory 41 and aprocessor 42.
Theprocessor 42 executes a first action while storing the first file from the home position to the target position;
storing the first file from the home position to the target position may specifically be: copying the first file from its original storage location to a target location; the following steps can be also included: and moving the first file from the original storage position to the target position, namely cutting the first file from the original storage position to the target position.
Executing a first action, which may be specifically: performing a first action in storing the first file from the home position to the target position; the following steps can be also included: in the process of storing the first file from the original position to the target position, the first action is decomposed into a first sub-action and a second sub-action, the first sub-action is executed when the first file is selected in the original storage position, and the second sub-action is executed when the first file is stored in the target position.
When the processor stores the first file from the home position to the target position, the processor executes a first action, which may specifically be: the processor executes a received first storage instruction sent to the selected first file, the first storage instruction is a first copying instruction or a first cutting instruction, the interface is moved to a target position, a first pasting instruction is executed, and meanwhile a first action is executed.
And sending a first storage instruction aiming at the first file, wherein the selection of the first file can be clicking the first file or executing a certain preset action aiming at the first file to realize the selection of the first file.
When the first copying instruction or the first cutting instruction is executed, the display of the electronic equipment displays an interface where the original storage position of the first file is located, and after the interface where the original storage position of the first file is located is moved to the interface where the target position is located from the interface where the original storage position of the first file, the first pasting instruction is executed, so that the first file is copied to the target position or moved to the target position.
In the process of copying or moving the first file to the target location, the first action is executed, and may be: executing the first action when executing the first paste instruction, or executing the first action after executing the first paste instruction; the method can also comprise the following steps: in the process of storing the first file from the original position to the target position, the first action is decomposed into a first sub-action and a second sub-action, the first sub-action is executed when the first file is selected in the original storage position, and the second sub-action is executed when the first file is stored in the target position.
When the processor stores the first file from the home position to the target position, the processor executes a first action, which may specifically be: the processor executes a received first storage instruction sent to the selected first file, wherein the first storage instruction is as follows: the first copying instruction or the first cutting instruction executes a first action, moves the interface to a target position and executes a first pasting instruction.
After executing the first storage instruction issued for the first file, a first action is executed, which may be specifically: the operation at a certain moment may be a continuous operation.
When the first action is taken as an action at a certain moment, namely after a first storage instruction is executed for a first file, the first action is executed, and when the interface is moved to the target position, the first action is executed;
when the first action is a continuous action, namely after the first storage instruction is executed for the first file, the first action is started to be executed until the interface is moved to the target position or the first paste instruction is executed, and the first action is not executed completely.
The memory 41 records the target position and the first action;
and recording the target position and the first action so as to execute the first action when other files are stored to the target position subsequently, and realizing the first action without searching the path of the target position again.
Processor 42 is also configured to perform a first action to store the second file to the target location when the second file is located.
Specifically, the following may be mentioned: when the second file is found, the second file is selected, and the first action is executed at the original storage position of the second file, so that the second file can be copied or moved to the target position; when the first action comprises: and when the first sub-action and the second sub-action are carried out, after the second file is selected, the first sub-action is executed, and then the second sub-action is executed, so that the second file is copied or moved to the target position.
When the second file is found, executing a first action, which may specifically be: when the second file is found, receiving a second storage instruction aiming at the second file, and executing a first action, wherein the second storage instruction is as follows: a second copy instruction or a second cut instruction, that is, after receiving the second storage instruction, executing the first action, that is, the first action only implements pasting the second file to the target location;
the method can also comprise the following steps: when the second file is found, the second file is selected, the first action is directly executed, and the second file can be stored in the target position, so that the second file can be copied and pasted to the target position or the second file can be cut and pasted to the target position by the first action.
In the electronic device disclosed in this embodiment, when the processor stores the first file from the original position to the target position, the processor executes the first action, and the memory records the target position and the first action. According to the scheme, the first action is executed when the first file is stored to the target position through recording, and after the second file needing to be stored is found, the first action is executed, so that the second file can be stored to the target position, namely, the file can be stored to the target position only by executing the first action, multiple times of entering and exiting of the target position are avoided, the operation of storing a plurality of files to the target position can be realized only by entering and exiting the target position once, the operation is simple, and the time is saved.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.