CN104462191A - File name altering method and electronic device - Google Patents

File name altering method and electronic device Download PDF

Info

Publication number
CN104462191A
CN104462191A CN201410583623.6A CN201410583623A CN104462191A CN 104462191 A CN104462191 A CN 104462191A CN 201410583623 A CN201410583623 A CN 201410583623A CN 104462191 A CN104462191 A CN 104462191A
Authority
CN
China
Prior art keywords
filename
specific fields
file
change
content
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
CN201410583623.6A
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.)
Samsung Guangzhou Mobile R&D Center
Samsung Electronics Co Ltd
Original Assignee
Samsung Guangzhou Mobile R&D Center
Samsung Electronics Co 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 Samsung Guangzhou Mobile R&D Center, Samsung Electronics Co Ltd filed Critical Samsung Guangzhou Mobile R&D Center
Priority to CN201410583623.6A priority Critical patent/CN104462191A/en
Publication of CN104462191A publication Critical patent/CN104462191A/en
Pending legal-status Critical Current

Links

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a file name altering method which includes the following steps that altering of a specific field in file content is detected; a file name is altered according to the specific field. Meanwhile, the invention correspondingly discloses an electric device capable of altering the file name. By means of the file name altering method and electronic device, automatic altering of the file name can be achieved.

Description

A kind of filename amending method and electronic equipment
Technical field
The present invention relates to electronic device field, particularly relate to a kind of filename amending method and electronic equipment.
Background technology
Along with the development of science and technology, electronic equipment becomes a requisite part in people's work, life, and in a lot of scene, people utilize the various affairs of electronic equipment process, and store all kinds of log file.
Different log files is needed to utilize different filenames to distinguish, but, when content is modified, because filename and the inconsistent of content easily cause the inconvenience of searching related content next time.
Therefore, a kind of new departure that can solve the problem is needed.
Summary of the invention
In order to solve above-mentioned one or more technical matters, and provide following advantage.The invention provides a kind of filename amending method and device.
Adopting one aspect of the present invention, without the need to carrying out manual amendment to filename again, the inconvenience brought repeating to revise filename can be eliminated.
On the other hand, can modify to filename in conjunction with file content, make filename can be consistent with file content.
Also on the one hand, corresponding filename can be determined according to the content of file.
In order to solve the problems of the technologies described above, the technical solution used in the present invention is:
A kind of filename amending method, comprises the following steps:
Detect the change of specific fields in file content;
Described filename is revised according to the change of described specific fields.
Further, further comprising the steps of:
Before revising described filename according to the change of described specific fields, provide the prompting whether revising described filename.
Further, between described filename and described specific fields, there is corresponding relation.
Further, described corresponding relation is determined by following steps:
Described file content is retrieved according to described filename;
When retrieving the specific fields matched with described filename, determine the corresponding relation between described filename and described specific fields.
Further, described corresponding relation is: described specific fields comprises whole field of described filename or the part field of described filename or the field corresponding with the form of described filename.
Further, the described step retrieving described file content according to described filename comprises:
The content of preset range in described file is retrieved,
Or, the full content of described file is retrieved.
Further, the step that described filename is revised in the described change according to described specific fields comprises:
In the closed condition of described file, revise described filename according to the change of described specific fields;
Or, in the open mode of described file, revise described filename according to the change of described specific fields.
A kind of electronic equipment, comprising:
Detection module, for detecting the change of specific fields in file content;
Filename modified module, for revising described filename according to the change of described specific fields.
Further, also comprise:
Reminding module, for before revising described filename according to the change of described specific fields, provides the prompting whether revising described filename.
Further, also comprise:
Respective modules, for retrieving described file content according to described filename; When retrieving the specific fields matched with described filename, determine the corresponding relation between described filename and described specific fields.
Further, described respective modules determines between described filename and described specific fields according to following rule corresponding relation:
Described specific fields is identical with the content of described filename;
Or described specific fields is identical with the partial content of described filename;
Or described specific fields is identical with the form of described filename.
Further, described respective modules, retrieves the content of preset range in described file, or, the full content of described file is retrieved.
Further, described filename modified module is used for the closed condition at described file, revises described filename according to the change of described specific fields; Or, in the open mode of described file, revise described filename according to the change of described specific fields.
beneficial effect
The present invention when file content changes, can revise filename according to the file content after changing, avoids the loaded down with trivial details of repetition manual modification filename by adopting technique scheme.And amended filename can be modified according to specific fields in file content, thus amended file can be made can to reflect the amendment that file content is up-to-date.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 a ~ 1b is embodiment of the present invention filename amending method process flow diagram;
Fig. 2 a ~ 2d is embodiment of the present invention filename open mode schematic diagram;
Fig. 3 is the retrieval flow figure of embodiment of the present invention specific fields;
Fig. 4 is for carrying out the electronic device module figure of filename amendment in the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments, each embodiment is not when repelling, and mutual combination is also the ingredient of content of the present invention.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
In the examples below, terminal can be mobile terminal (such as, mobile phone, panel computer, notebook etc.), also can be the terminal (as desk-top computer etc.) of other types.The operating system that terminal is run also is various types of system, such as, and the Android system be widely used at present, or Windows operating system, iOS system etc., but be not limited to this.
This terminal can comprise storage medium, and the program element stored in storage medium can be used for performing the method described in following examples.This terminal can also comprise processor, and this processor may be used for performing said procedure unit.It is contemplated that following described method or device can be realized by program element, the mode that also can be combined by hardware or software and hardware is realized.
Fig. 1 a ~ 1b is embodiment of the present invention filename amending method process flow diagram.
Fig. 2 a ~ 2d is embodiment of the present invention filename open mode schematic diagram.
Fig. 3 is the retrieval flow figure of embodiment of the present invention specific fields.
With reference to figure 1a, in step S101, detect the change of specific fields in file content.In the state that file is opened, operator often carries out editing operation to file, thus corresponding file content is changed, some specific content may be made to convert the change of file content, such as these specific contents can be the title of file content, field in file header or footer or date, or can with the field of representative textual representation file content or state.
After change specific fields in file being detected according to above-mentioned steps S101, further in step s 102, according to the change amendment filename of specific fields.This amendment filename can be according to change after the direct alternate file name of specific fields or a part in filename.
With reference to figure 1b, during as above-described embodiment, in step 1011, operator is first pointed out whether to carry out the amendment of this filename.If operator provides the operation of affirmative, then the amendment of completing steps S102 file name; If namely the operation that operator provides negative is not agreed to revise filename, then the retouching operation of no longer execute file name.
With reference to figure 2a ~ 2b, in above-mentioned steps S101, in an embodiment of the present invention, specific fields can be the title of file content.Such as, in Fig. 2 a, at one with in " filename amending method " file for total title, after operator adds the content relevant to electronic installation hereof, understand by adaptive for file title be revised as " filename amending method and electronic installation " to be applicable to corresponding file content, as Fig. 2 b.Therefore, for this take file title as the situation of specific fields, can detect that in the open mode of file title adds new content in current editing operation, from the change this specific fields being detected.
Certainly, those skilled in the art can know, the embodiment of the present invention is not limited to only be specific fields with file title and carries out the technical scheme that detects.In interchangeable other embodiments of the invention, as Fig. 2 c, can also detect as specific fields on field in above-mentioned header or footer or date, to obtain the change of specific fields, in header, such as record " version v1.0 " after changing, detect that this specific fields becomes " version v1.1 " or using the change of the conversion on corresponding date as the specific fields detected, as Fig. 2 d.In addition to the implementation, other can all can be used as specific fields with the field of representative textual representation file content or state and be detected, and are detected the change of this specific fields when there is change.
In the above-described embodiments, detect and occur in operator and open file and go forward side by side while edlin, also can detect with the time interval set as the cycle in the open mode of file, or when close file, carry out disposable detection.Accordingly, in alternative embodiments, detect and not only to perform operating the state opened file, also can perform while file is undertaken operating by not operation and modified by other program or after amendment joint, in such cases, file can by other program on backstage access and edit, but do not show interface that is accessed or editor to operator, but, but corresponding specific fields this change same being detected.
With reference to figure 3, the one as above-described embodiment is expanded, and above-mentioned specific fields can for have corresponding corresponding relation to filename.Therefore, carrying out detection time to the specific fields with this corresponding relation, determine dynamically by following steps.
In step S301, according to filename retrieving files content, this retrieval can the entirety of whole filename be retrieved, also can some field in file for according to retrieving, same can entrained form be also that field is retrieved in file, such as, there is in filename date format " 09-11 ".
In step 302, when retrieving the specific fields matched with above-mentioned filename, then determine, between this specific fields and filename, there is corresponding relation.Such as, with " filename amending method " in the file of filename, retrieve in title " a kind of filename amending method and electronic installation " specific fields being present in filename and matching, then determine that title and filename have corresponding relation.Again such as, in the file being filename with " AAA_v1.0 ", retrieve " version number v1.1 " field recorded in header and there is the record identical with " v1. " part in filename, then can determine this equally with header field for the corresponding relation between specific fields and filename.Therefore, those skilled in the art can know, identical with above-mentioned rule, can determine corresponding specific fields in the filename that there is extended formatting or date format equally hereof.
Further, in above-mentioned steps S302, when retrieving file content, can retrieve the full content of file, to guarantee to find the specific fields with filename in file content with corresponding relation.Or, for shortening retrieval time and saving calculation resources, can only to the content retrieval in the preset range in file.Such as, in an embodiment of the present invention, according to the usual editing rule of file, file title generally appears at the beginning part of file content, therefore, the preset range of retrieval can be set to a line or the multirow of file content beginning, thus only retrieve in this preset range.
One as above-mentioned steps S102 embodiment of the present invention is expanded, because specific fields and filename have corresponding corresponding relation, then after specific fields change, according to the respective field in this corresponding relation determination filename, thus complete the amendment to this respective field in filename.
To the amendment filename that the amendment of filename can be synchronous while the open mode of file is edited the specific fields in file content, such as, when increasing field " and electronic installation " to file title for " filename amending method ", according in file content to the increase of content taking title as specific fields, in filename, synchronously increase the related content of " and electronic installation " while this content can be increased.
Accordingly, another kind of interchangeable embodiment is, according to the usual mode of operation of operator to file, usually after completing the once amendment to file content, can preservation operation be carried out, then, when completing preservation operation, according to before preservation operation, filename be revised to the change of specific fields.
As the another kind of embodiment be equal to mutually with above-described embodiment, amendment filename can also specific fields change occur after predetermined amount of time through carrying out afterwards, such as, after completing the editor to specific fields, judge whether to have passed through predetermined amount of time, and there is not new editing operation in this predetermined amount of time after, then can according to the change filename of the change correspondence of specific fields before predetermined amount of time.
Revise the embodiment of filename with the open mode at file, corresponding, the embodiment of the present invention can after file be closed, according to the change of specific fields with regard to this filename.According to the change of the specific fields detected in above-mentioned steps S101, when close file, this amended specific fields is preserved, and after completing the shutoff operation of file, utilize amended specific fields to revise filename.
By above-described embodiment, the filename that can be is modified according to file content, thus avoids operator after having revised file at every turn, and manual modification filename is loaded down with trivial details again.Further, the amendment of filename is corresponding with the specific fields in file content, therefore, can keep the consistance of filename and file content.
Fig. 4 is for carrying out the electronic device module figure of filename amendment in the embodiment of the present invention.
With reference to figure 5, in this electronic equipment, comprise detection module and filename modified module.Wherein, detection module the open mode of file or by editing mode in detect in file content, to obtain the change of specific fields in file content.The change of the specific fields of filename modified module detected by detection module is modified to filename.
As the expansion of above-described embodiment, also can comprise reminding module, for before filename modified module is modified to filename, provide the prompting whether carrying out filename amendment, and after obtaining the operating result confirming amendment, instruction filename modified module completes the retouching operation to filename.Accordingly, if this reminding module does not obtain the operating result determining to revise, then filename modified module is indicated not perform the operation of modifying to filename.
In above-described embodiment, as specific fields and filename for revising filename foundation, there is corresponding relation.Therefore, as the expansion of this embodiment, also can comprise respective modules further, this respective modules is used for the corresponding relation between specific fields and filename.When determining this corresponding relation, first respective modules gives according to filename retrieving files content, and when retrieving the specific fields matched with file content, the specific fields this retrieved is defined as having corresponding relation between filename.
In above-mentioned retrieving, specific fields can perform in the following manner with mating of filename, and namely specific fields is identical with the content of filename, or identical with the partial content of filename or specific fields and filename the form of specific fields is identical.
When above-mentioned respective modules is retrieved file content, as a kind of embodiment of the present invention, for guaranteeing to get specific fields at file content, respective modules is retrieved using the entirety of file content as range of search.As the interchangeable scheme of one, for saving calculation resources and raising the efficiency, respective modules can only be retrieved the file content in preset range, such as, binding operation person demand, only beginning a line of retrieving files content or a few row or the only header of retrieving files or footer.
Invention technician can know, above-described embodiment is only exemplary illustration, determine that the specific fields of mating with filename can be undertaken by the open mode that operator carries out editing at file by retrieval in the present invention, other states that also can be modified at file but not undertaken by the state that operator opens.
At the above-mentioned filename modified module for modifying to filename in the operation of modifying to filename according to specific fields, as a kind of embodiment of the present invention, can in the open mode of file, the amendment filename synchronous according to the change of specific fields, or revise filename when the predetermined amount of time after specific fields is modified does not occur again to change, or when getting the preservation operation that operator implements, the change amendment filename of rear specific fields can also be operated according to preservation.Corresponding with above-described embodiment, filename modified module can also in the closed condition of file, according to the change of specific fields amendment filename, after file is closed, this filename modified module completes amendment to filename according to being saved in the specific fields after change.
More than describe and be only the preferred embodiment of the application and the explanation to institute's application technology principle.Those skilled in the art are to be understood that, invention scope involved in the application, be not limited to the technical scheme of the particular combination of above-mentioned technical characteristic, also should be encompassed in when not departing from described inventive concept, other technical scheme of being carried out combination in any by above-mentioned technical characteristic or its equivalent feature and being formed simultaneously.The technical characteristic that such as, disclosed in above-mentioned feature and the application (but being not limited to) has similar functions is replaced mutually and the technical scheme formed.

Claims (13)

1. a filename amending method, is characterized in that, comprises the following steps:
Detect the change of specific fields in file content;
Described filename is revised according to the change of described specific fields.
2. method as claimed in claim 1, is characterized in that, further comprising the steps of:
Before revising described filename according to the change of described specific fields, provide the prompting whether revising described filename.
3. method as claimed in claim 1 or 2, is characterized in that having corresponding relation between described filename and described specific fields.
4. method as claimed in claim 3, it is characterized in that, described corresponding relation is determined by following steps:
Described file content is retrieved according to described filename;
When retrieving the specific fields matched with described filename, determine the corresponding relation between described filename and described specific fields.
5. method as described in claim 3 or 4, is characterized in that, described corresponding relation is: described specific fields comprises whole field of described filename or the part field of described filename or the field corresponding with the form of described filename.
6. method as claimed in claim 4, is characterized in that, the described step retrieving described file content according to described filename comprises:
The content of preset range in described file is retrieved,
Or, the full content of described file is retrieved.
7. method as claimed in claim 1, it is characterized in that, the step that described filename is revised in the described change according to described specific fields comprises:
In the closed condition of described file, revise described filename according to the change of described specific fields;
Or, in the open mode of described file, revise described filename according to the change of described specific fields.
8. an electronic equipment, is characterized in that comprising:
Detection module, for detecting the change of specific fields in file content;
Filename modified module, for revising described filename according to the change of described specific fields.
9. electronic equipment as claimed in claim 8, is characterized in that, also comprise:
Reminding module, for before revising described filename according to the change of described specific fields, provides the prompting whether revising described filename.
10. electronic equipment as described in claim 8 or 9, is characterized in that, also comprises:
Respective modules, for retrieving described file content according to described filename; When retrieving the specific fields matched with described filename, determine the corresponding relation between described filename and described specific fields.
11. electronic equipments as claimed in claim 10, is characterized in that: described respective modules determines the corresponding relation between described filename and described specific fields according to following rule:
Described specific fields is identical with the content of described filename;
Or described specific fields is identical with the partial content of described filename;
Or described specific fields is identical with the form of described filename.
12. electronic equipments as claimed in claim 10, is characterized in that: described respective modules, retrieve the content of preset range in described file, or, the full content of described file is retrieved.
13. electronic equipments as claimed in claim 8, is characterized in that: described filename modified module is used for the closed condition at described file, revises described filename according to the change of described specific fields; Or, in the open mode of described file, revise described filename according to the change of described specific fields.
CN201410583623.6A 2014-10-27 2014-10-27 File name altering method and electronic device Pending CN104462191A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410583623.6A CN104462191A (en) 2014-10-27 2014-10-27 File name altering method and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410583623.6A CN104462191A (en) 2014-10-27 2014-10-27 File name altering method and electronic device

Publications (1)

Publication Number Publication Date
CN104462191A true CN104462191A (en) 2015-03-25

Family

ID=52908227

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410583623.6A Pending CN104462191A (en) 2014-10-27 2014-10-27 File name altering method and electronic device

Country Status (1)

Country Link
CN (1) CN104462191A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106777301A (en) * 2016-12-30 2017-05-31 珠海市魅族科技有限公司 File management method and device
CN107506395A (en) * 2017-07-31 2017-12-22 合肥龙图腾信息技术有限公司 A kind of method and system to open mode file renaming

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040002942A1 (en) * 2002-06-28 2004-01-01 Microsoft Corporation System and method for managing file names for file system filter drivers
CN101601067A (en) * 2007-01-30 2009-12-09 富士胶片株式会社 Image recording structure and image recording process
CN102088574A (en) * 2009-12-08 2011-06-08 新奥特(北京)视频技术有限公司 Method and device for making caption
CN102360353A (en) * 2011-09-27 2012-02-22 汉王科技股份有限公司 Storage method and device of scanned file as well as scanning equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040002942A1 (en) * 2002-06-28 2004-01-01 Microsoft Corporation System and method for managing file names for file system filter drivers
CN101601067A (en) * 2007-01-30 2009-12-09 富士胶片株式会社 Image recording structure and image recording process
CN102088574A (en) * 2009-12-08 2011-06-08 新奥特(北京)视频技术有限公司 Method and device for making caption
CN102360353A (en) * 2011-09-27 2012-02-22 汉王科技股份有限公司 Storage method and device of scanned file as well as scanning equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106777301A (en) * 2016-12-30 2017-05-31 珠海市魅族科技有限公司 File management method and device
CN107506395A (en) * 2017-07-31 2017-12-22 合肥龙图腾信息技术有限公司 A kind of method and system to open mode file renaming

Similar Documents

Publication Publication Date Title
US10705748B2 (en) Method and device for file name identification and file cleaning
KR101557212B1 (en) Method, sharing platform, and system for sharing image-editing action
CN103150079B (en) A kind of application icon management method and device based on Firefox OS platforms
US20100070880A1 (en) User interface for improving the use of notes with email messages that provides a static visual relationship between notes and email messages and a note incorporation capability
CN102981765A (en) Text processing method and terminal
CN105224462A (en) The recognition methods of control element and device
CN103729340A (en) Method and device for editing table in webpage
WO2016044754A1 (en) Mobile application configuration
CN107305527B (en) Code file processing method and device
US20110161376A1 (en) Automated file merging through content classification
CN106027785A (en) Voice processing method and terminal
CN104620221A (en) Capturing activity history stream
CN105183184A (en) Character processing method and terminal
US20200067860A1 (en) File sending in instant messaging application
CN105205142A (en) Method, device and mobile terminal for saving log file
CN107590162A (en) The storage method and device of journal file
CN104462191A (en) File name altering method and electronic device
CN104484241B (en) The method and device that a kind of pair of terminal system file is backed up and restored
JP2008250789A (en) Information processing system and program
US20130275850A1 (en) Autonomic visual emphasis of previewed content
CN105573593A (en) Shortcut menu display method and apparatus
CN105138502A (en) Method for recognizing copy objects and collecting data
CN112434494A (en) Text editing method, device, terminal and storage medium
CN104317566B (en) For the data duplication method and device of software interface
CN104601811A (en) Contact information processing method

Legal Events

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

Application publication date: 20150325

RJ01 Rejection of invention patent application after publication