CN103514231A - File naming method and electronic device - Google Patents

File naming method and electronic device Download PDF

Info

Publication number
CN103514231A
CN103514231A CN201210227076.9A CN201210227076A CN103514231A CN 103514231 A CN103514231 A CN 103514231A CN 201210227076 A CN201210227076 A CN 201210227076A CN 103514231 A CN103514231 A CN 103514231A
Authority
CN
China
Prior art keywords
character string
name
file
substring
replaced
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201210227076.9A
Other languages
Chinese (zh)
Inventor
严志军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201210227076.9A priority Critical patent/CN103514231A/en
Publication of CN103514231A publication Critical patent/CN103514231A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/164File meta data generation
    • G06F16/166File name conversion

Abstract

The invention discloses a file naming method and an electronic device. The file naming method is applied to the electronic device and comprises the steps that a naming instruction is obtained, a file folder to be named at present is determined, and the naming instruction at least comprises a result character string; the type of the naming instruction is judged; when the naming instruction is in the batch naming type, one or more directory files contained in the file folder to be processed at present are obtained; sub-character strings to be replaced are determined in name character strings of the directory files respectively; a name character string of the file folder to be named at present is replaced with the result character string; the sub-character strings to be replaced are replaced with the result character string.

Description

A kind of method of file designation and electronic equipment
Technical field
The application relates to document management field, particularly a kind of method of file designation and electronic equipment.
Background technology
Catalogue file refers to All Files or the file being stored under a certain catalogue.At present, when the modification name of catalogue file being carried out in batches, need to adopt single naming method one by one the file or folder in file directory to be named, operate comparatively loaded down with trivial detailsly, reduce the batch of catalogue file is named to efficiency.
Summary of the invention
The application's technical matters to be solved is to provide a kind of file designation method and electronic equipment, in order to solve in prior art when the modification name of catalogue file being carried out in batches, need to adopt single naming method one by one the file or folder in file directory to be named, operate comparatively loaded down with trivial detailsly, reduced the technical matters to the batch name efficiency of catalogue file.
For solving the problems of the technologies described above, the application provides a kind of method of file designation, is applied in electronic equipment, and described method comprises:
Obtain name instruction, and determine file current to be named, in described name instruction, at least comprise result character string;
Judge the type of described name instruction;
When the type of described name instruction is named for batch, obtain the catalogue file that described current file to be named comprises, described catalogue file is one or more;
In the name character string of described catalogue file, determine respectively substring to be replaced;
The name character string of described current file to be named is replaced with to described result character string;
Described substring to be replaced is replaced with to described result character string.
Said method, preferably, when the type of described name instruction is single name, described method also comprises:
The name character string of described current file to be named is replaced with to described result character string.
Said method, preferably, describedly in the name character string of described catalogue file, determine that respectively substring to be replaced comprises:
Obtain respectively the name character string of described catalogue file;
In described name character string, search and whether comprise the substring identical with described current Folder Name character string to be named, if so, in described name character string, determine substring to be replaced.
Said method, preferably, describedly in the name character string of described catalogue file, determine that respectively substring to be replaced comprises:
Obtain respectively the name character string of described catalogue file;
If do not find the substring identical with described result character string in described name character string, in described name character string, determine substring to be replaced.
Said method, preferably, if find the substring identical with described result character string in described name character string, described method also comprises:
The substring identical with described result character string in name character string described in mark, and described in mark in name character string initial character to described substring between tab character;
Using the described substring of mark as substring to be replaced.
The application also provides a kind of electronic equipment, comprises command acquisition unit, type judging unit, catalogue file acquiring unit, character string determining unit, the first replacement unit and the second replacement unit, wherein:
Described command acquisition unit, for obtaining name instruction, and determines file current to be named, and in described name instruction, at least comprises result character string;
Described type judging unit, for judging the type of described name instruction, when the type of described name instruction is named for batch, triggers described catalogue file acquiring unit;
Catalogue file acquiring unit, the catalogue file comprising for obtaining described current file to be named, described catalogue file is one or more, triggers described character string determining unit;
Described character string determining unit, at the definite substring to be replaced of name character string of described catalogue file, triggers described the first replacement unit and described the second replacement unit for respectively;
Described the first replacement unit, for replacing with described result character string by the name character string of described current file to be named;
Described the second replacement unit, for replacing with described result character string by described substring to be replaced.
Above-mentioned electronic equipment, preferably, also comprises the 3rd replacement unit, wherein:
Described the 3rd replacement unit, is triggered when the type of judging described name instruction is single name by described type judging unit, for the name character string of described current file to be named is replaced with to described result character string.
Above-mentioned electronic equipment, preferably, described character string determining unit comprises that first determines subelement, wherein:
Described first determines subelement, for obtaining respectively the name character string of described catalogue file, and in described name character string, search whether comprise the substring identical with described current Folder Name character string to be named, if so, in described name character string, determine substring to be replaced.
Above-mentioned electronic equipment, preferably, described character string determining unit comprises that second determines subelement, wherein:
Described second determines subelement, for obtaining respectively the name character string of described catalogue file, if do not find the substring identical with described result character string in described name character string, determines substring to be replaced in described name character string.
Above-mentioned electronic equipment, preferably, described character string determines that subelement also comprises that the 3rd determines subelement, wherein:
The described the 3rd determines subelement, by described second, determine that subelement triggers while finding the character string identical with described result character string in described name character string, for the name character string substring identical with described result character string described in mark, and described in mark in name character string initial character to described substring between tab character, using the described substring of mark as substring to be replaced.
From such scheme, the method of a kind of file designation that the application provides and electronic equipment, final amended result character string is obtained in the name instruction of inputting by user, and determine including the file to be named of one or more catalogue files to be modified, and then determine the substring to be replaced in the catalogue file name character string in this document by the type of name instruction, and this substring to be replaced is replaced with to result character string, the name character string of file to be named is replaced with to result character string simultaneously, thereby realize the batch name to catalogue file, avoided in prior art when the modification name of catalogue file being carried out in batches, need to adopt single naming method one by one the file or folder in file directory to be named, operate comparatively loaded down with trivial details, reduced the technical matters to the batch name efficiency of catalogue file.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present application, below the accompanying drawing of required use during embodiment is described is briefly described, apparently, accompanying drawing in the following describes is only some embodiment of the application, for those of ordinary skills, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
The process flow diagram of the embodiment of the method one of a kind of file designation that Fig. 1 provides for the application;
The process flow diagram of the embodiment of the method two of a kind of file designation that Fig. 2 provides for the application;
The part process flow diagram of the embodiment of the method three of a kind of file designation that Fig. 3 provides for the application;
The part process flow diagram of the embodiment of the method four of a kind of file designation that Fig. 4 provides for the application;
Another part process flow diagram of the embodiment of the method four of a kind of file designation that Fig. 5 provides for the application;
The structural representation of a kind of electronic equipment embodiment mono-that Fig. 6 provides for the application;
The structural representation of a kind of electronic equipment embodiment bis-that Fig. 7 provides for the application;
The structural representation of a kind of electronic equipment embodiment tri-that Fig. 8 provides for the application;
The structural representation of a kind of electronic equipment embodiment tetra-that Fig. 9 provides for the application;
Another structural representation of a kind of electronic equipment embodiment tetra-that Figure 10 provides for the application.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present application, the technical scheme in the embodiment of the present application is clearly and completely described, obviously, described embodiment is only the application's part embodiment, rather than whole embodiment.Embodiment based in the application, those of ordinary skills are not making the every other embodiment obtaining under creative work prerequisite, all belong to the scope of the application's protection.
The method of a kind of file designation that the application provides and electronic equipment, final amended result character string is obtained in the name instruction of inputting by user, and determine including the file to be named of one or more catalogue files to be modified, and then determine the substring to be replaced in the catalogue file name character string in this document by the type of name instruction, and this substring to be replaced is replaced with to result character string, the name character string of file to be named is replaced with to result character string simultaneously, thereby realize the batch name to catalogue file, avoided in prior art when the modification name of catalogue file being carried out in batches, need to adopt single naming method one by one the file or folder in file directory to be named, operate comparatively loaded down with trivial details, reduced the technical matters to the batch name efficiency of catalogue file.
The application is applicable to Android android operating system platform, is also applicable to as operating system platforms such as Saipan Symbian, ios, window, phone.
With reference to figure 1, it shows the process flow diagram of the embodiment of the method one of a kind of file designation that the application provides, and method is specifically applied in electronic equipment described in the present embodiment one, and described method can comprise the following steps:
Step 101: obtain name instruction, and determine file current to be named, at least comprise result character string in described name instruction.
Wherein, described name instruction can be inputted by user, and the result character string that described name instruction comprises can be specified by user, can also determine according to preset rules.For example, when user inputs name instruction, result character string " National Day " is write in described name instruction.
It should be noted that, determine the specific implementation of file current to be named, can be for determining by name instruction, other instructions that can also input by user are determined.Described current file to be named can be the root directory of disk storage, can also be certain single file directory (being file).For example: single file directory :/IMG/ catalogue.
Step 102: the type that judges described name instruction.
Wherein, the type of described name instruction comprises: the batch name type that file current to be named and contained catalogue file thereof are all named, and the types such as single name type of only file current to be named being named.
Step 103: when the type of described name instruction is named for batch, obtain the catalogue file that described current file to be named comprises, described catalogue file is one or more.
Wherein, when the type of described name instruction is named for batch, need file current to be named and the catalogue file that comprises thereof all to rename, now, obtain the catalogue file that described named file comprises, it should be noted that, described current file to be named comprises one or more catalogue files, described catalogue file can be document, can also be file.For example: in/IMG/ catalogue, include name character string and be respectively the file of IMG_0001, IMG_0002, IMG_0003 and the file that name is called IMG_0004.
Step 104: determine respectively substring to be replaced in the name character string of described catalogue file.
Wherein, get the catalogue file of described current file to be named in described step 103 after, described in each, in the name character string of catalogue file, determine the substring to be replaced that need to replace.For example: in/IMG/ catalogue, the substring to be replaced of IMG_0001, IMG_0002, IMG_0003 and IMG_0004 is IMG.
Step 105: the name character string of described current file to be named is replaced with to described result character string.
For example, the name character string of/IMG/ catalogue is replaced with to described result character string " National Day ", now this catalogue is :/National Day/.
Step 106: described substring to be replaced is replaced with to described result character string.
Wherein, described step 105 and described step 106 are for carrying out the specific implementation of name in batches to the title of described current file to be named and the catalogue file that comprises thereof.For example: by/National Day/the substring IMG to be replaced of catalogue file IMG_0001, IMG_0002, IMG_0003 and IMG_0004 all replace with described result character string " National Day ", now, described/National Day/the title of catalogue file be followed successively by as National Day _ 0001, National Day _ 0002, National Day _ 0003 and National Day _ 0004.
From such scheme, the embodiment of the method one of a kind of file designation that the application provides, by obtaining and determining file current to be named name instruction, determine in file current to be named, substring to be replaced in catalogue file name character string, and then by the name character string of file current to be named, replace with the result character string in name instruction with described substring to be replaced, the batch name of realization to file current to be named and the catalogue file that comprises thereof, has improved the operating efficiency renaming.
With reference to figure 2, it shows the process flow diagram of the embodiment of the method two of a kind of file designation that the application provides, and when the type of judging described name instruction in described step 102 is single name, described method can also comprise the following steps:
Step S103: the name character string of described current file to be named is replaced with to described result character string.
It should be noted that, described step S103 and described step 103 are concurrency relation, when the type of described name instruction is name in batches, when user need to all name the described current catalogue file wait naming file and comprising, carry out described step 103 to described step 106; When the type of described name instruction is single name, user only need to, to described current when naming file to name, carry out described step S103.
From such scheme, the embodiment of the method two of a kind of file designation that the application provides, can be according to user's actual name demand, the title of file to be named is modified or treat named file folder and the title of the catalogue file that comprises is modified simultaneously, guaranteeing to realize the batch name of the catalogue file for the treatment of named file folder and comprising, when having improved the operating efficiency renaming, better meet user's request.
With reference to figure 3, it shows the part process flow diagram of the embodiment of the method three of a kind of file designation that the application provides, and described step 104 specifically can comprise the following steps:
Step 301: the name character string that obtains respectively described catalogue file.
Wherein, need to be to described current when naming catalogue file that file comprises to rename, after obtaining the catalogue file that described current file to be named comprises, determine respectively the name character string of described catalogue file.For example: the name character string of catalogue file in/IMG/ catalogue: " IMG_0001 ", " IMG_0002 ", " IMG_0003 " and " IMG_0004 ".
Step 302: search in described name character string and whether comprise the substring identical with described current Folder Name character string to be named, if so, carry out described step 303.
Wherein, in the described name character string obtaining, search it and whether comprise the substring identical with described current Folder Name character string to be named, for example: the name character string of catalogue file in/IMG/ catalogue: search character string " IMG " in " IMG_0001 ", " IMG_0002 ", " IMG_0003 " and " IMG_0004 ".If find the substring identical with described current named file name character string to be come in described name character string, carry out described step 303, otherwise, finish current file name.
Step 303: determine substring to be replaced in described name character string.
Wherein, in described name character string, find include with described current wait name Folder Name cook table manner with substring time, in described name character string, determine substring to be replaced.
Preferably, the specific implementation of described step 303 comprises:
According to described character, determine rule, in described name character string, determine substring to be replaced.
Wherein, described character determines that rule is arranged in described name instruction, can when editing described name instruction, be arranged by user, when the application's embodiment of the method three is carried out beginning, generates, and can also arrange according to preset rules;
Described character determines that rule can also be arranged at the replacement instruction of user's input, at least comprises in described replacement instruction: rule determined in character, and wherein, described replacement instruction generates in the implementation of the application's embodiment of the method three.
Preferably, described character determines that rule is specifically as follows:
By in described name character string, the substring identical with described current Folder Name character string to be named be as substring to be replaced.
For example: the name character string of catalogue file in/IMG/ catalogue: " IMG_0001 ", " IMG_0002 ", " IMG_0003 " and " IMG_0004 ", substring " IMG " that will be wherein identical with character string " IMG " is as character string to be replaced, when the follow-up title to catalogue file renames, directly the substring to be replaced " IMG " in catalogue file name character string is replaced with to result character string " National Day ", be: " National Day _ 0001 ", " National Day _ 0002 ", " National Day _ 0003 " and " National Day _ 0004 ".
Preferably, described character determines that rule can also be specifically:
By in described name character string, the character string identical with Folder Name character string described to be named carry out mark respectively;
In described name character string, the tab character string of take, as target judges that forward whether next bit character is identical, if so, carries out mark by described next bit character respectively, and continues to judge that forward whether next bit character is identical, until next bit character is not identical;
In described name character string, the tab character string of take, as target judges that whether next bit character is identical backward, if so, carries out mark by described next bit character respectively, and continues to judge that backward whether next bit character is identical, until next bit character is not identical;
Respectively using the string of tab character in described name character string as substring to be replaced.
For example: the name character string of catalogue file in/IMG/ catalogue: " IMG_0001 ", " IMG_0002 ", " IMG_0003 " and " IMG_0004 ", wherein identical with character string " IMG " substring " IMG " is carried out to mark, and will be in described name character string, take tab character string as the target identical character of mark next bit character forward and backward, finally, the name character string of described current file to be named will be included in the name character string of described catalogue file, and the longest substring is as substring to be replaced, be about to character string " IMG_000 " as substring to be replaced, when the follow-up title to catalogue file renames, directly the substring to be replaced " IMG_000 " in catalogue file name character string is replaced with to result character string " National Day ", be: " National Day 1 ", " National Day 2 ", " National Day 3 " and " National Day 4 ".
From such scheme, the embodiment of the method three of a kind of file designation that the application provides, by obtaining and determining file current to be named name instruction, determine in file current to be named, the substring to be replaced of Folder Name character string to be named described in containing in catalogue file name character string, and then by the name character string of file current to be named, replace with the result character string in name instruction with described substring to be replaced, the batch name of realization to file current to be named and the catalogue file that comprises thereof, improved the operating efficiency renaming.
With reference to figure 4, it shows the part process flow diagram of the embodiment of the method four of a kind of file designation that the application provides, and described step 104 specifically can comprise the following steps:
Step 401: the name character string that obtains respectively described catalogue file.
Wherein, need to be to described current when naming catalogue file that file comprises to rename, after obtaining the catalogue file that described current file to be named comprises, determine respectively the name character string of described catalogue file.For example: the name character string of catalogue file in/IMG/ catalogue: " IMG_0001 ", " IMG_0002 ", " IMG_0003 " and " IMG_0004 ".
Step 402: search the substring identical with described result character string in described name character string, if do not found, carry out described step 403.
Wherein, in the described name character string obtaining, search and whether comprise the substring identical with described result character string, for example: the name character string of catalogue file in/IMG/ catalogue: " IMG_0001 ", " IMG_0002 ", " IMG_0003 " and " IMG searches character string " National Day ".If do not find in described name character string and substring identical in described result character string, carry out described step 403.
Step 403: determine substring to be replaced in described name character string.
Preferably, the specific implementation of described step 403 comprises:
According to described character, determine rule, in described name character string, determine substring to be replaced.
Wherein, described character determines that rule is arranged in described name instruction, can when editing described name instruction, be arranged by user, when the application's embodiment of the method four is carried out beginning, generates, and can also arrange according to preset rules;
Described character determines that rule can also be arranged at the replacement instruction of user's input, at least comprises in described replacement instruction: rule determined in character, and wherein, described replacement instruction generates in the implementation of the application's embodiment of the method four.
Preferably, described character determines that rule is specifically as follows:
By in described name character string, the substring identical with described current Folder Name character string to be named be as substring to be replaced.
For example: the name character string of catalogue file in/IMG/ catalogue: " IMG_0001 ", " IMG_0002 ", " IMG_0003 " and " IMG_0004 ", while not finding therein the substring identical with result character string " National Day ", substring " IMG " that will be wherein identical with character string " IMG " is as character string to be replaced, when the follow-up title to catalogue file renames, directly the substring to be replaced " IMG " in catalogue file name character string is replaced with to result character string " National Day ", be: " National Day _ 0001 ", " National Day _ 0002 ", " National Day _ 0003 " and " National Day _ 0004 ".
Preferably, described character determines that rule can also be specifically:
By in described name character string, the character string identical with Folder Name character string described to be named carry out mark respectively;
In described name character string, the tab character string of take, as target judges that forward whether next bit character is identical, if so, carries out mark by described next bit character respectively, and continues to judge that forward whether next bit character is identical, until next bit character is not identical;
In described name character string, the tab character string of take, as target judges that whether next bit character is identical backward, if so, carries out mark by described next bit character respectively, and continues to judge that backward whether next bit character is identical, until next bit character is not identical;
Respectively using the string of tab character in described name character string as substring to be replaced.
For example: the name character string of catalogue file in/IMG/ catalogue: " IMG_0001 ", " IMG_0002 ", " IMG_0003 " and " IMG_0004 ", while not finding therein the substring identical with result character string " National Day ", wherein identical with character string " IMG " substring " IMG " is carried out to mark, and will be in described name character string, take tab character string as the target identical character of mark next bit character forward and backward, finally, the name character string of described current file to be named will be included in the name character string of described catalogue file, and the longest substring is as substring to be replaced, be about to character string " IMG_000 " as substring to be replaced, when the follow-up title to catalogue file renames, directly the substring to be replaced " IMG_000 " in catalogue file name character string is replaced with to result character string " National Day ", be: " National Day 1 ", " National Day 2 ", " National Day 3 " and " National Day 4 ".
From such scheme, the embodiment of the method four of a kind of file designation that the application provides, by obtaining and determining file current to be named name instruction, determine in file current to be named, the substring to be replaced of Folder Name character string to be named described in containing in catalogue file name character string, and then by the name character string of file current to be named, replace with the result character string in name instruction with described substring to be replaced, the batch name of realization to file current to be named and the catalogue file that comprises thereof, improved the operating efficiency renaming.
Preferably, with reference to figure 5, the part process flow diagram that it shows the embodiment of the method four of a kind of file designation that the application provides finds the substring identical with described result character string in described name character string in described step 402, described method can also comprise the following steps:
Step 501: the substring identical with described result character string in name character string described in mark.
Wherein, in described step 402, while finding the substring identical with described result character string, can skip catalogue file corresponding to this name character string, not process;
Can also catalogue file corresponding to this name character string do not skipped to processing, and according to the method shown in Fig. 5, carry out file and rename.
For example: in/IMGX/ catalogue, the name character string of catalogue file respectively: " IMGX_0001 ", " IMGX_0002 ", " IMGX_0003 ", " National Day _ 0004 " and " 0628 National Day _ 0005 ", this/IMGX/ catalogue in the name character string of catalogue file, search the character string identical with described result character string " National Day ", result is: in the catalogue file that is " National Day _ 0004 " and " 0628 National Day _ 0005 " at name character string, find,, the substring " National Day " of mark " National Day _ 0004 " and " 0628 National Day _ 0005 ".
Step 502: described in mark in name character string initial character to described substring between tab character.
For example, in name character string " 0628 National Day _ 0005 ", find the substring identical with described result character string, now, carry out described step 501 and described step 502, mark substring " 0628 ".
Preferably, the specific implementation of described step 502 is:
Obtain the initial character of described name character string;
Whether the initial character that judges described name character string is labeled, and if so, finishes current file name, otherwise, described in mark in name character string initial character to described substring between tab character.
Wherein, the initial character in described name character string can be the initial character of tab character string, now, and without carrying out subsequent step.
For example: in name character string " National Day _ 0004 ", find the substring identical with described result character string, carry out described step 501, now the initial character of described name character string is labeled, the be fated rule of preceding document name of the designator that the catalogue file that this name character string is corresponding is described, without repeating name, finish current file name.
Step 503: using the described substring of mark as substring to be replaced.
Wherein, in the complete described name character string of described step 502 mark after satisfactory character, using the substring of described mark as substring to be replaced.
For example: in name character string " 0628 National Day _ 0005 ", mark substring is " 0628 National Day ", this mark substring " 0628 National Day " be substring to be replaced, when the follow-up title to catalogue file renames, directly the substring to be replaced in catalogue file name character string " 0628 National Day " is replaced with to result character string " National Day ", be: " National Day _ 0005 ".
With reference to figure 6, it shows the structural representation of a kind of electronic equipment embodiment mono-that the application provides, described electronic equipment comprises command acquisition unit 601, type judging unit 602, catalogue file acquiring unit 603, character string determining unit 604, the first replacement unit 605 and the second replacement unit 606, wherein:
Described command acquisition unit 601, for obtaining name instruction, and determines file current to be named, and in described name instruction, at least comprises result character string;
Described type judging unit 602, for judging the type of described name instruction, when the type of described name instruction is named for batch, triggers described catalogue file acquiring unit 603;
Catalogue file acquiring unit 603, the catalogue file comprising for obtaining described current file to be named, described catalogue file is one or more, triggers described character string determining unit 604;
Described character string determining unit 604, at the definite substring to be replaced of name character string of described catalogue file, triggers described the first replacement unit 605 and described the second replacement unit 606 for respectively;
Described the first replacement unit 605, for replacing with described result character string by the name character string of described current file to be named;
Described the second replacement unit 606, for replacing with described result character string by described substring to be replaced.
From such scheme, a kind of electronic equipment embodiment mono-that the application provides, by obtaining and determining file current to be named name instruction, determine in file current to be named, substring to be replaced in catalogue file name character string, and then by the name character string of file current to be named, replace with the result character string in name instruction with described substring to be replaced, the batch name of realization to file current to be named and the catalogue file that comprises thereof, has improved the operating efficiency renaming.
With reference to figure 7, it shows the structural representation of a kind of electronic equipment embodiment bis-that the application provides, and described electronic equipment also comprises the 3rd replacement unit 607, wherein:
Described the 3rd replacement unit 607, is triggered when the type of judging described name instruction is single name by described type judging unit 602, for the name character string of described current file to be named is replaced with to described result character string.
From such scheme, a kind of electronic equipment embodiment bis-that the application provides, can be according to user's actual name demand, the title of file to be named is modified or treat named file folder and the title of the catalogue file that comprises is modified simultaneously, in the batch name that guarantees to realize to file current to be named and the catalogue file that comprises thereof, when having improved the operating efficiency renaming, better meet user's request.
With reference to figure 8, it shows the structural representation of a kind of electronic equipment embodiment tri-that the application provides, and described character string determining unit 604 comprises that first determines subelement 641, wherein:
Described first determines subelement 641, for obtaining respectively the name character string of described catalogue file, and in described name character string, search whether comprise the substring identical with described current Folder Name character string to be named, if so, in described name character string, determine substring to be replaced.
From such scheme, a kind of electronic equipment embodiment tri-that the application provides, by obtaining and determining file current to be named name instruction, determine in file current to be named, the substring to be replaced of Folder Name character string to be named described in containing in catalogue file name character string, and then by the name character string of file current to be named, replace with the result character string in name instruction with described substring to be replaced, the batch name of realization to file current to be named and the catalogue file that comprises thereof, improved the operating efficiency renaming.
With reference to figure 9, its show that the application provides one in the structural representation of electronic equipment embodiment tetra-, described character string determining unit 604 comprises that second determines subelement 642, wherein:
Described second determines subelement 642, for obtaining respectively the name character string of described catalogue file, if do not find the substring identical with described result character string in described name character string, determines substring to be replaced in described name character string.
From such scheme, a kind of electronic equipment embodiment tetra-that the application provides, by obtaining and determining file current to be named name instruction, determine in file current to be named, described in containing in catalogue file name character string, file to be named claims the substring to be replaced of character string, and then by the name character string of file current to be named, replace with the result character string in name instruction with described substring to be replaced, the batch name of realization to file current to be named and the catalogue file that comprises thereof, improved the operating efficiency renaming.
Preferably, with reference to Figure 10, it shows another structural representation of a kind of electronic equipment embodiment tetra-that the application provides, and wherein said character string determines that subelement 604 also comprises that the 3rd determines subelement 643, wherein:
The described the 3rd determines subelement 643, by described second, determine that subelement 642 triggers while finding the character string identical with described result character string in described name character string, for the name character string substring identical with described result character string described in mark, and described in mark in name character string initial character to described substring between tab character, using the described substring of mark as substring to be replaced.
In this instructions, each embodiment adopts the mode of going forward one by one to describe, and each embodiment stresses is the difference with other embodiment, between each embodiment identical similar part mutually referring to.For the disclosed device of embodiment is the application's electronic equipment embodiment, because it is corresponding with the method for the disclosed file designation of embodiment, so description is fairly simple, relevant part partly illustrates referring to method.
Above the method for a kind of file designation provided by the present invention and electronic equipment are described in detail, the above-mentioned explanation to the disclosed embodiments, makes professional and technical personnel in the field can realize or use the present invention.To the multiple modification of these embodiment, will be apparent for those skilled in the art, General Principle as defined herein can, in the situation that not departing from the spirit or scope of the present invention, realize in other embodiments.Therefore, the present invention will can not be restricted to these embodiment shown in this article, but will meet the widest scope consistent with principle disclosed herein and features of novelty.

Claims (10)

1. a method for file designation, is characterized in that, is applied in electronic equipment, and described method comprises:
Obtain name instruction, and determine file current to be named, in described name instruction, at least comprise result character string;
Judge the type of described name instruction;
When the type of described name instruction is named for batch, obtain the catalogue file that described current file to be named comprises, described catalogue file is one or more;
In the name character string of described catalogue file, determine respectively substring to be replaced;
The name character string of described current file to be named is replaced with to described result character string;
Described substring to be replaced is replaced with to described result character string.
2. method according to claim 1, is characterized in that, when the type of described name instruction is single name, described method also comprises:
The name character string of described current file to be named is replaced with to described result character string.
3. method according to claim 1, is characterized in that, describedly in the name character string of described catalogue file, determines that respectively substring to be replaced comprises:
Obtain respectively the name character string of described catalogue file;
In described name character string, search and whether comprise the substring identical with described current Folder Name character string to be named, if so, in described name character string, determine substring to be replaced.
4. method according to claim 1, is characterized in that, describedly in the name character string of described catalogue file, determines that respectively substring to be replaced comprises:
Obtain respectively the name character string of described catalogue file;
If do not find the substring identical with described result character string in described name character string, in described name character string, determine substring to be replaced.
5. method according to claim 4, is characterized in that, if find the substring identical with described result character string in described name character string, described method also comprises:
The substring identical with described result character string in name character string described in mark, and described in mark in name character string initial character to described substring between tab character;
Using the described substring of mark as substring to be replaced.
6. an electronic equipment, is characterized in that, comprises command acquisition unit, type judging unit, catalogue file acquiring unit, character string determining unit, the first replacement unit and the second replacement unit, wherein:
Described command acquisition unit, for obtaining name instruction, and determines file current to be named, and in described name instruction, at least comprises result character string;
Described type judging unit, for judging the type of described name instruction, when the type of described name instruction is named for batch, triggers described catalogue file acquiring unit;
Catalogue file acquiring unit, the catalogue file comprising for obtaining described current file to be named, described catalogue file is one or more, triggers described character string determining unit;
Described character string determining unit, at the definite substring to be replaced of name character string of described catalogue file, triggers described the first replacement unit and described the second replacement unit for respectively;
Described the first replacement unit, for replacing with described result character string by the name character string of described current file to be named;
Described the second replacement unit, for replacing with described result character string by described substring to be replaced.
7. electronic equipment according to claim 6, is characterized in that, also comprises the 3rd replacement unit, wherein:
Described the 3rd replacement unit, is triggered when the type of judging described name instruction is single name by described type judging unit, for the name character string of described current file to be named is replaced with to described result character string.
8. electronic equipment according to claim 6, is characterized in that, described character string determining unit comprises that first determines subelement, wherein:
Described first determines subelement, for obtaining respectively the name character string of described catalogue file, and in described name character string, search whether comprise the substring identical with described current Folder Name character string to be named, if so, in described name character string, determine substring to be replaced.
9. electronic equipment according to claim 6, is characterized in that, described character string determining unit comprises that second determines subelement, wherein:
Described second determines subelement, for obtaining respectively the name character string of described catalogue file, if do not find the substring identical with described result character string in described name character string, determines substring to be replaced in described name character string.
10. method according to claim 9, is characterized in that, described character string determines that subelement also comprises that the 3rd determines subelement, wherein:
The described the 3rd determines subelement, by described second, determine that subelement triggers while finding the character string identical with described result character string in described name character string, for the name character string substring identical with described result character string described in mark, and described in mark in name character string initial character to described substring between tab character, using the described substring of mark as substring to be replaced.
CN201210227076.9A 2012-06-29 2012-06-29 File naming method and electronic device Pending CN103514231A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210227076.9A CN103514231A (en) 2012-06-29 2012-06-29 File naming method and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210227076.9A CN103514231A (en) 2012-06-29 2012-06-29 File naming method and electronic device

Publications (1)

Publication Number Publication Date
CN103514231A true CN103514231A (en) 2014-01-15

Family

ID=49896962

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210227076.9A Pending CN103514231A (en) 2012-06-29 2012-06-29 File naming method and electronic device

Country Status (1)

Country Link
CN (1) CN103514231A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104978404A (en) * 2015-06-04 2015-10-14 无锡天脉聚源传媒科技有限公司 Video album name generating method and apparatus
CN106339479A (en) * 2016-08-30 2017-01-18 深圳市金立通信设备有限公司 Picture naming method and terminal
CN106446350A (en) * 2016-08-31 2017-02-22 江苏国泰新点软件有限公司 Method and device for modifying parameters of family types of design class platform
CN106488299A (en) * 2015-08-26 2017-03-08 深圳市腾讯计算机系统有限公司 Video file methods of exhibiting and system
CN107341155A (en) * 2016-04-29 2017-11-10 阿里巴巴集团控股有限公司 File designation method and device
CN111813747A (en) * 2020-07-09 2020-10-23 广东一一五科技股份有限公司 File batch renaming method, electronic equipment and computer readable storage medium
CN112835857A (en) * 2021-02-07 2021-05-25 福建师范大学 Method for managing file main name of work group

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040260693A1 (en) * 2003-06-19 2004-12-23 International Business Machines Corporation Configuration management life rename utility
CN1996283A (en) * 2005-12-31 2007-07-11 英保达股份有限公司 File sorting-save management method and system therefor
CN101599066A (en) * 2008-06-03 2009-12-09 鸿富锦精密工业(深圳)有限公司 Bulk operation and management system of documents and method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040260693A1 (en) * 2003-06-19 2004-12-23 International Business Machines Corporation Configuration management life rename utility
CN1996283A (en) * 2005-12-31 2007-07-11 英保达股份有限公司 File sorting-save management method and system therefor
CN101599066A (en) * 2008-06-03 2009-12-09 鸿富锦精密工业(深圳)有限公司 Bulk operation and management system of documents and method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
杨兴平: "批量命名,想变就变", 《电脑知识与技术》, 31 October 2010 (2010-10-31), pages 26 - 27 *

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104978404A (en) * 2015-06-04 2015-10-14 无锡天脉聚源传媒科技有限公司 Video album name generating method and apparatus
CN104978404B (en) * 2015-06-04 2018-07-20 无锡天脉聚源传媒科技有限公司 A kind of generation method and device of video album title
CN106488299A (en) * 2015-08-26 2017-03-08 深圳市腾讯计算机系统有限公司 Video file methods of exhibiting and system
CN106488299B (en) * 2015-08-26 2020-04-17 深圳市腾讯计算机系统有限公司 Video file display method and system
CN107341155A (en) * 2016-04-29 2017-11-10 阿里巴巴集团控股有限公司 File designation method and device
CN107341155B (en) * 2016-04-29 2020-07-07 阿里巴巴集团控股有限公司 File naming method and device
CN106339479A (en) * 2016-08-30 2017-01-18 深圳市金立通信设备有限公司 Picture naming method and terminal
CN106446350A (en) * 2016-08-31 2017-02-22 江苏国泰新点软件有限公司 Method and device for modifying parameters of family types of design class platform
CN111813747A (en) * 2020-07-09 2020-10-23 广东一一五科技股份有限公司 File batch renaming method, electronic equipment and computer readable storage medium
CN112835857A (en) * 2021-02-07 2021-05-25 福建师范大学 Method for managing file main name of work group

Similar Documents

Publication Publication Date Title
CN103514231A (en) File naming method and electronic device
KR101556435B1 (en) Database backing-up and recovering method and device
CN104376073A (en) Database recovery method and device
CN105302533A (en) Code synchronizing method and apparatus
CN102279749B (en) Method and equipment for merging codes
CN103246638A (en) Information pasting method and device
CN105573587B (en) A kind of method and device of management of icons
CN103473076A (en) Issuing method and issuing system for code version
CN105630818A (en) Batch file renaming method and apparatus
CN105468373A (en) Branch merging method and device
CN105224332A (en) A kind of application program generates method and apparatus
CN106874195A (en) A kind of bug for android applications repairs and continues delivery scheme
CN106295340A (en) A kind of program file recovery system and method
CN106648822B (en) Interface character string selection method and system
CN105893068A (en) Offline upgrading method and device of intelligent equipment
CN104317602B (en) The development approach and device of a kind of mainframe code file
CN112860231A (en) Front-end framework conversion method and device
CN102467376B (en) Modification method and device for character information
CN105676775B (en) A kind of digital control processing original track rollback and the control method for continuing processing
CN106648794A (en) Component loading method and device
CN110673849B (en) Method and device for presetting file security contexts in batches
CN111258595A (en) PyInstaler-based python source code packaging method
CN107632864B (en) Method for establishing UEFI Boot Order of specific ordering
CN104199689A (en) Method and device for installing comprehensive front end system
CN105205177A (en) Method for file processing, system and file processing terminal

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20140115

RJ01 Rejection of invention patent application after publication