JP5122883B2 - File name conversion method and apparatus, file name conversion program and recording medium - Google Patents
File name conversion method and apparatus, file name conversion program and recording medium Download PDFInfo
- Publication number
- JP5122883B2 JP5122883B2 JP2007198159A JP2007198159A JP5122883B2 JP 5122883 B2 JP5122883 B2 JP 5122883B2 JP 2007198159 A JP2007198159 A JP 2007198159A JP 2007198159 A JP2007198159 A JP 2007198159A JP 5122883 B2 JP5122883 B2 JP 5122883B2
- Authority
- JP
- Japan
- Prior art keywords
- file name
- long
- category
- short
- conversion
- 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.)
- Expired - Fee Related
Links
Images
Description
本発明は、ロングファイルネームをショートファイルネームに変換するファイルネーム変換方法および装置、ファイルネーム変換プログラムならびにかかるプログラムを記録した記録媒体に関するものである。 The present invention relates to a file name conversion method and apparatus for converting a long file name into a short file name, a file name conversion program, and a recording medium on which such a program is recorded.
現在のほとんどのコンピュータ用オペレーティングシステム(以下「OS」と略称)で管理されるファイルネームは、12文字以上の長さ(例えば「This_is_the_file.htm」)を有することができ、このようなファイルネームは、一般的に、ロングファイルネームと呼ばれる。 A file name managed by most current computer operating systems (hereinafter abbreviated as “OS”) can have a length of 12 characters or more (for example, “This_is_the_file.htm”). Commonly called long file name.
一方、ある系統のOSでは、歴史的な経緯から、例えば「filename.exe」などの、8+3文字(いわゆる8.3形式)のショートファイルネームしかサポートされていない。このような旧式のタイプのOSやその下で実行されるアプリケーションプログラムにも、ロングファイルネームで命名されたファイルを扱えるようにする必要がある。そこで現在のOSにも、付与したロングファイルネーム(例えば「This_is_the_file.htm」)とともに、これに対応する8.3形式のショートファイルネーム(「This_i~1.HTM」)を生成するものがある。 On the other hand, an OS of a certain system supports only a short file name of 8 + 3 characters (so-called 8.3 format) such as “filename.exe” for historical reasons. Such an old type OS and an application program executed under the old type OS need to be able to handle a file named with a long file name. Therefore, some current OSs generate a long file name (for example, “This_is_the_file.htm”) and a corresponding 8.3 short file name (“This_i˜1.HTM”).
例えば単体のデジタルカメラ、あるいは携帯電話機などの携帯情報端末に設けられたデジタルカメラで撮像した画像をファイルとして保存するとき、撮影日時をロングファイルネームとして自動的に生成する方法が知られている。 For example, when an image captured by a single digital camera or a digital camera provided in a portable information terminal such as a mobile phone is stored as a file, a method of automatically generating a shooting date and time as a long file name is known.
冒頭の撮影年月日時分に通し番号を付加したロングファイルネームをショートファイルネームへ変換する従来の代表的な方法は、次の通りである。(1)ロングファイルネームのピリオドの後の最初の3文字を拡張子とする。(2)ショートファイルネームの8文字中、最後の2文字はチルダ「~」と数字とを組み合わせた「~1」で始まる通し番号とする。通し番号は8文字中の最初の6文字が共通するファイルを識別するために用いる。かかるファイルが10個以上に増加した場合には、通し番号の占める文字数を3文字まで拡張し、通し番号(「~10」等)とする。(3)ショートファイルネームはすべて大文字とする。 A typical conventional method for converting a long file name in which a serial number is added to the shooting date and time at the beginning to a short file name is as follows. (1) The first three characters after the period of the long file name are used as the extension. (2) Of the 8 characters in the short file name, the last 2 characters are serial numbers beginning with “~ 1”, which is a combination of a tilde “~” and a number. The serial number is used to identify a file in which the first 6 of the 8 characters are common. When the number of such files increases to 10 or more, the number of characters occupied by the serial number is expanded to 3 characters to obtain a serial number (such as “˜10”). (3) All short file names are capitalized.
ロングファイルネームに対応したショートファイルネームを生成する他の方法として、例えば特許文献1がある。特許文献1では、検出されたロングファイルネームを配列に格納し、格納した配列の番号と、予め定めた文字列とを組み合わせてショートファイルネームを生成する。この方法による利点は、ロングファイルネームを構成する文字数に関係なく、ショートファイルネームを生成可能なことである。特許文献1では、生成されたショートファイルネームも配列に格納し、ショートファイルネームによってロングファイルネームを管理するというファイル管理方法を開示している。
従来の、ファイル作成年月日時分に通し番号を付加したロングファイルネームをショートファイルネームに変換する方法には、次の問題がある。すなわち、同一の時分内に撮像された画像ファイルなど、前半部が共通するロングファイルネームが多く存在するほど、ロングファイルネームをショートファイルネームに変換する処理に時間がかかる。これは「~」(チルダ)に続く数字として、空き番号をサーチする必要があることに起因する。 The conventional method for converting a long file name in which a serial number is added to the date of creation of a file into a short file name has the following problems. That is, the more long file names that have the same first half, such as image files captured within the same time, the longer it takes to convert the long file name to the short file name. This is because it is necessary to search for a free number as a number following “~” (tilde).
したがって、カメラで撮像した画像ファイル保存と同時に従来のショートファイルネーム生成処理が実行されると、保存に時間がかかり、その待機中、ユーザはカメラを操作できず、もどかしい印象を与えかねない。 Therefore, if the conventional short file name generation process is executed simultaneously with saving the image file captured by the camera, the saving takes time, and the user cannot operate the camera during the standby, which may give a frustrating impression.
一方、特許文献1の欠点は、アプリケーション側にて、ロングファイルネーム格納用に予め大きなサイズの配列を確保しておかねばならないことである。しかも最大ファイル数が特定できない場合は、余裕をもった配列数の確保が必要であり、メモリ使用効率が低下する。またロングからショートへのファイルネーム変換前後では、全く異なるファイルネームになるため、ファイルの対応関係を把握できないという欠点もある。 On the other hand, the disadvantage of Patent Document 1 is that the application side must ensure a large size array for long file name storage in advance. In addition, when the maximum number of files cannot be specified, it is necessary to secure the number of arrays with a margin, and the memory usage efficiency decreases. In addition, there is a disadvantage that the file correspondence cannot be grasped because the file names are completely different before and after the file name conversion from long to short.
本発明はこのような課題に鑑み、ロングファイルネームからショートファイルネームへの変換処理時間を短縮し、変換前後のファイルネームの対応関係も明確なファイルネーム変換方法を提供することを目的とする。 In view of such problems, an object of the present invention is to provide a file name conversion method that shortens the conversion processing time from a long file name to a short file name and has a clear correspondence between the file names before and after conversion.
上述の課題を解決するために、本発明によるファイルネーム変換方法の代表的な構成では、コンピュータが、ファイル作成日時に関する上位のカテゴリから下位のカテゴリの、各カテゴリを表す文字列を順次配列したロングファイルネームを仮決定するロングファイルネーム仮決定工程と、仮決定したロングファイルネームを、下位のカテゴリから上位のカテゴリへ、各カテゴリを表す文字列を順次配列したロングファイルネームに変換するロングファイルネーム予備変換工程と、変換したロングファイルネームの先頭の一部の文字列および通し番号で構成される、ロングファイルネームより短いショートファイルネームを決定するショートファイルネーム決定工程とを実行することを特徴とする。 To solve the problems described above, in a typical configuration of a file name conversion method according to the invention, the computer, from the top of the category for the file creation date and time of a lower category, were successively arranged a string that represents each category Long Long file name tentative determination process for tentatively determining the file name, and long file name that converts the tentatively determined long file name from a lower category to an upper category, and a long file name in which character strings representing each category are sequentially arranged A preliminary conversion step and a short file name determination step for determining a short file name shorter than the long file name, which is composed of a partial character string at the beginning of the converted long file name and a serial number, are performed. .
上記の構成によれば、共通しているケースが少ない、変動しやすい下位カテゴリをファイルネーム冒頭に移動させることによって、ロングファイルネームの冒頭に識別性を持たせることができる。これにより、ショートファイルネームとして採用される、ロングファイルネーム冒頭部分は、ショートファイルネーム決定時に、通し番号をインクリメントするなどのループ処理が不要となる。したがって、ショートファイルネーム決定時の処理時間が短縮されるという効果が得られる。 According to the above configuration, the beginning of a long file name can be given distinctiveness by moving a subcategory that is less common and easily fluctuated to the beginning of the file name. This eliminates the need for loop processing such as incrementing the serial number at the beginning of the long file name adopted as the short file name when determining the short file name. Therefore, the effect that the processing time for determining the short file name is shortened can be obtained.
上述のロングファイルネーム仮決定工程で決定するロングファイルネームは、ファイル作成時点を表す各カテゴリで構成するとよい。また、その場合、上述の各カテゴリは、ファイル作成時点の「年」「月」「日」「時」「分」を含むとよい。 The long file name determined in the above-described long file name provisional determination step may be composed of each category representing the file creation time. In this case, each category described above may include “year”, “month”, “day”, “hour”, and “minute” at the time of file creation.
ファイル作成時点を表すファイルネームとすれば、後のユーザによる検索に便利だからである。 This is because if the file name indicates the point in time when the file is created, it is convenient for subsequent searches by the user.
本発明によるファイルネーム変換方法は、上述のロングファイルネーム予備変換工程で変換したロングファイルネーム、および、ショートファイルネーム決定工程で決定したショートファイルネームを対応させて保存するファイルネーム保存工程をさらに含むとよい。 The file name conversion method according to the present invention further includes a file name storing step for storing the long file name converted in the long file name preliminary converting step and the short file name determined in the short file name determining step in association with each other. Good.
本発明によれば、ショートファイルネームには「時」「分」しか含まれないため、検索対象とするのは困難である。またアプリケーションソフトウェアがデフォルトで用意するロングファイルネームが「文書1」や「book1」などの、特に意味をなさないファイルネームである場合も、検索し難い。 According to the present invention, since the short file name includes only “hour” and “minute”, it is difficult to make a search target. In addition, it is difficult to search even when the long file name provided by default by the application software is a file name that does not make sense, such as “Document 1” or “book 1”.
しかし、ロングファイルネームには「時」「分」だけでなく「年」「月」「日」も含まれている。つまりファイル作成時点を表すすべてのカテゴリで構成されているため、検索がしやすい。しかも、ショートファイルネームは、上述のロングファイルネーム予備変換工程で変換したロングファイルネームの先頭の一部の文字列および通し番号で構成されるため、対応関係が一目瞭然なもの同士を対応させて保存することができる。 However, long file names include not only “hour” and “minute” but also “year”, “month”, and “day”. In other words, it is easy to search because it consists of all categories that represent the time of file creation. In addition, since the short file name is composed of a part of the first character string and serial number of the long file name converted in the long file name preliminary conversion step, the short file names are stored in correspondence with each other at a glance. be able to.
一方、変換前の、上位カテゴリから下位カテゴリへと文字列が配列されるロングファイルネームは、ユーザにとっては感覚的になじみやすい場合が多いと考えられ、変換後のものより検索がさらにしやすいという利点がある。以上の観点から、変換前のロングファイルネームを保存して検索対象とすることにも大きな効果があると考えられる。 On the other hand, long file names in which character strings are arranged from the upper category to the lower category before conversion are considered to be familiar to the user in many senses, and it is easier to search than those after conversion. There are advantages. From the above viewpoint, it is considered that there is a great effect in storing the long file name before conversion and making it a search target.
また変換前のロングファイルネームを保存する場合も、ロングファイルネームとショートファイルネームの対応関係は、明確である。ショートファイルネームはロングファイルネームの一部を用いて作成されるからである。 Also, when the long file name before conversion is stored, the correspondence between the long file name and the short file name is clear. This is because the short file name is created by using a part of the long file name.
本発明によるファイルネーム変換装置の代表的な構成によれば、ファイル作成日時に関する上位のカテゴリから下位のカテゴリの、各カテゴリを表す文字列を順次配列したロングファイルネームを仮決定するロングファイルネーム仮決定手段と、仮決定したロングファイルネームを、下位のカテゴリから上位のカテゴリへ、各カテゴリを表す文字列を順次配列したロングファイルネームに変換するロングファイルネーム予備変換手段と、変換したロングファイルネームの先頭の一部の文字列および通し番号で構成される、ロングファイルネームより短いショートファイルネームを決定するショートファイルネーム決定手段とを含むことを特徴とする。 According to a typical configuration of a file name converter according to the present invention, from the top of the category for the file creation date and time of a lower category, long filenames tentative temporarily determines the long filenames are sequentially arranged a string that represents each category A determination means, a long file name preliminary conversion means for converting the temporarily determined long file name from a lower category to an upper category, and a long file name in which character strings representing each category are sequentially arranged, and the converted long file name And a short file name determining means for determining a short file name shorter than the long file name, which is composed of a partial character string and a serial number at the beginning of the file name.
上述のロングファイルネーム仮決定手段で決定するロングファイルネームは、ファイル作成時点を表す各カテゴリで構成するとよい。またその場合、各カテゴリは、ファイル作成時点の「年」「月」「日」「時」「分」を含むとよい。 The long file name determined by the above-mentioned long file name provisional determination means may be composed of each category representing the time of file creation. In that case, each category may include “year”, “month”, “day”, “hour”, and “minute” at the time of file creation.
本発明によるファイルネーム変換装置はさらに、ロングファイルネーム予備変換手段で変換したロングファイルネーム、および、ショートファイルネーム決定手段で決定したショートファイルネームを対応させて保存するファイルネーム保存手段をさらに含むとよい。 The file name conversion device according to the present invention further includes a file name storage unit that stores the long file name converted by the long file name preliminary conversion unit and the short file name determined by the short file name determination unit in association with each other. Good.
本発明によるファイルネーム変換プログラムの代表的な構成によれば、コンピュータに、ファイル作成日時に関する上位のカテゴリから下位のカテゴリの、各カテゴリを表す文字列を順次配列したロングファイルネームを仮決定するロングファイルネーム仮決定工程と、仮決定したロングファイルネームを、下位のカテゴリから上位のカテゴリへ、各カテゴリを表す文字列を順次配列したロングファイルネームに変換するロングファイルネーム予備変換工程と、変換したロングファイルネームの先頭の一部の文字列および通し番号で構成される、ロングファイルネームより短いショートファイルネームを決定するショートファイルネーム決定工程とを実行させることを特徴とする。 According to a typical configuration of the file name conversion program according to the present invention, the computer temporarily determines the level of the categories for file creation date and time of a lower category, the long filenames are sequentially arranged a string that represents each category Long A temporary file name determination step, a long file name preliminary conversion step for converting the temporarily determined long file name from a lower category to an upper category, and a long file name in which character strings representing each category are sequentially arranged. A short file name determination step for determining a short file name shorter than the long file name, which is composed of a partial character string and a serial number at the beginning of the long file name, is performed .
本発明による記録媒体の代表的な構成によれば、コンピュータに、ファイル作成日時に関する上位のカテゴリから下位のカテゴリの、各カテゴリを表す文字列を順次配列したロングファイルネームを仮決定するロングファイルネーム仮決定工程と、仮決定したロングファイルネームを、下位のカテゴリから上位のカテゴリへ、各カテゴリを表す文字列を順次配列したロングファイルネームに変換するロングファイルネーム予備変換工程と、変換したロングファイルネームの先頭の一部の文字列および通し番号で構成される、ロングファイルネームより短いショートファイルネームを決定するショートファイルネーム決定工程とを実行させるファイルネーム変換プログラムを記録していることを特徴とする。
According to a typical configuration of a recording medium according to the present invention, long filenames on the computer, temporarily determines the level of the categories for file creation date and time of a lower category, the long filenames are sequentially arranged a string that represents each category Temporary determination step, long file name preliminary conversion step for converting the temporarily determined long file name from a lower category to an upper category, and a long file name in which character strings representing each category are sequentially arranged, and the converted long file A file name conversion program for executing a short file name determination step for determining a short file name shorter than a long file name, which is composed of a partial character string at the beginning of the name and a serial number, is recorded. .
本発明によれば、ロングファイルネームをショートファイルネームに変換する処理時間が著しく短縮される。また、メモリ使用効率も低下しない。そしてロングファイルネームとショートファイルネームとの対応関係も分かりやすい。 According to the present invention, the processing time for converting a long file name to a short file name is significantly shortened. Further, the memory usage efficiency does not decrease. The correspondence between long file names and short file names is easy to understand.
次に添付図面を参照して本発明によるファイルネーム変換方法および装置、ファイルネーム変換プログラムならびに記録媒体の実施形態を詳細に説明する。図中、本発明に直接関係のない要素は図示を省略する。また、同様の要素は同一の参照符号によって表示する。なお、以下の実施形態に示す寸法、材料、その他具体的な数値などは、発明の理解を容易とするための例示に過ぎず、特に断る場合を除き、本発明を限定するものではない。 Next, embodiments of a file name conversion method and apparatus, a file name conversion program, and a recording medium according to the present invention will be described in detail with reference to the accompanying drawings. In the figure, elements not directly related to the present invention are not shown. Similar elements are denoted by the same reference numerals. Note that dimensions, materials, and other specific numerical values shown in the following embodiments are merely examples for facilitating understanding of the invention, and do not limit the present invention unless otherwise specified.
(ファイルネーム変換装置)
図1は、本発明のファイルネーム変換装置の実施形態である携帯情報端末を示すブロック図である。携帯情報端末100は、PHS(Personal Handy-phone System)や携帯電話、PDA(Personal Digital Assistant)等としてよい。
(File name conversion device)
FIG. 1 is a block diagram showing a portable information terminal which is an embodiment of a file name conversion apparatus of the present invention. The
携帯情報端末100は、デジタルカメラ110と、記録装置120と、日付時刻ユニット130と、デジタルカメラ110の撮像や記録装置120におけるファイルネーム決定を制御する制御部140とを含む。
The
制御部140には、ロングファイルネーム仮決定部150と、ロングファイルネーム変換部152と、ショートファイルネーム決定部160とが含まれ、これらはいずれも、携帯情報端末100で実行されるアプリケーションプログラムの一部を構成するサブプログラムである。
The
記録装置120にはさらに、作成される画像ファイルのロングファイルネームおよびショートファイルネームを対応させて記録するファイルアロケーションテーブル(File Allocation Table; FAT)170が含まれる。
The
(ファイルネーム変換方法)
図2は、図1の携帯情報端末によって実行される、本発明のファイルネーム変換方法の実施形態であるアプリケーションプログラムの動作を示すフローチャートである。
(File name conversion method)
FIG. 2 is a flowchart showing the operation of an application program which is an embodiment of the file name conversion method of the present invention executed by the portable information terminal of FIG.
以下、ステップS200は図1のロングファイルネーム仮決定部150によって行う。ステップS210からS230までは、図1のロングファイルネーム変換部152によって行う。
Hereinafter, step S200 is performed by the long file name
まずロングファイルネームを仮決定する(ステップS200)。ロングファイルネーム仮決定部150は、日付時刻ユニット130から、撮像時の日付時刻を取得する。撮影日時が例えば2007年4月3日13時56分なら、ロングファイルネームは「070403_1356~001.jpg」と仮決定する。これは、撮影日時分に通し番号「~001」を付加するという命名規則に則って仮決定したものである。
First, a long file name is provisionally determined (step S200). The long file name
このように、ロングファイルネームは、上位のカテゴリ(年)から下位のカテゴリ(月→日→時→分→通し番号)へ、各カテゴリを表す文字列を順次配列して仮決定する。 As described above, the long file name is provisionally determined by sequentially arranging the character strings representing the respective categories from the upper category (year) to the lower category (month → day → hour → minute → serial number).
本実施形態の特徴は、効率的にショートファイルネームが生成できるように、ショートファイルネームを決定する前に、ロングファイルネーム変換部152によって、ロングファイルネームを予備変換することである(ステップS210)。この工程では、仮決定したロングファイルネームを、逆に、下位のカテゴリ(通し番号)から上位のカテゴリ(分→時→年月日)へ、各カテゴリを表す文字列を順次配列したロングファイルネームに変換する。
The feature of this embodiment is that the long file
より具体的には、ロングファイルネームのチルダより後ろの3文字をファイルネームの先頭に移動し、アンダーバー「_」を挿入して「分」「時」を並べ、さらにアンダーバーを挿入して「年月日」を並べる。予備変換の結果、ロングファイルネームは「001_5613_070403.jpg」となる。 More specifically, move the three characters after the tilde of the long file name to the beginning of the file name, insert an underscore “_”, arrange “minutes” and “hours”, then insert an underscore and add “Year Line up "Month and Date". As a result of the preliminary conversion, the long file name is “001_5613_070403.jpg”.
予備変換したロングファイルネームは、それがファイルシステム内に既存かどうかチェックする(ステップS220)。同一日時分に作成された他のファイルが既に存在する場合、既存であるため、通し番号をインクリメントした「070403_1356~002.jpg」に再びロングファイルネームを仮決定(ステップS200)する。予備変換したロングファイルネームが既存でなければ、それを、保存するロングファイルネームとして決定する(ステップS230)。 The pre-converted long file name is checked to see if it exists in the file system (step S220). If other files created for the same date and time already exist, the long file name is provisionally determined again to “070403_1356 to 002.jpg” with the serial number incremented (step S200). If the pre-converted long file name does not exist, it is determined as a long file name to be stored (step S230).
同一の「日時分」に複数のファイルが作成される場合には、ロングファイルネームの決定時からループ処理が行われる。しかし、同一の「日時」や同一の「日」に作成されるファイルの数に比較して、同一の「日時分」に作成されるファイルの数は少なく、ループ処理にかかる時間はわずかである。 When a plurality of files are created for the same “date and time”, a loop process is performed from the time of determining the long file name. However, compared to the number of files created on the same “date and time” and the same “day”, the number of files created on the same “date and time” is small, and the time required for loop processing is small. .
以下、ステップS240からステップS290までは、図1のショートファイルネーム決定部160によって行う。
Hereinafter, steps S240 to S290 are performed by the short file
決定したロングファイルネームに基づき、ショートファイルネームを仮決定する(ステップS240)。決定したロングファイルネームが「002_5613_070403.jpg」であれば、その先頭の一部(6文字)の文字列および通し番号でショートファイルネームは構成され、「002_56~1.JPG」に仮決定される。なお必須ではないが、ロングファイルネームの拡張子が小文字である一方、ショートファイルネームの拡張子は大文字としている。 A short file name is provisionally determined based on the determined long file name (step S240). If the determined long file name is “002_5613_070403.jpg”, the short file name is composed of the character string and serial number of the first part (six characters) and is temporarily determined as “002_56 to 1.JPG”. Although not required, the extension of the long file name is lowercase, while the extension of the short file name is uppercase.
仮決定したショートファイルネームは、それがルートディレクトリに存在するか否かをサーチする(ステップS250)。仮に存在する場合は通し番号をインクリメントし(ステップS260)、ショートファイルネーム「002_56~2.JPG」として再び仮決定する(ステップS240)。 The temporarily determined short file name is searched for whether it exists in the root directory (step S250). If it exists, the serial number is incremented (step S260), and the short file name “002_56 to 2.JPG” is temporarily determined again (step S240).
仮決定したショートファイルネームがルートディレクトリに存在しなければ、サブディレクトリに存在するか否かをさらにサーチする(ステップS270)。存在していれば、通し番号をインクリメントし(ステップS260)、ショートファイルネームとして再び仮決定し、ステップS240を繰り返す。 If the tentatively determined short file name does not exist in the root directory, it is further searched whether or not it exists in the subdirectory (step S270). If it exists, the serial number is incremented (step S260), provisionally determined again as a short file name, and step S240 is repeated.
仮決定したショートファイルネームがルートディレクトリにもサブディレクトリにも存在しなければ、それをショートファイルネームとして決定する(ステップS280)。このようにして、ロングファイルネームより短いショートファイルネームを決定する。 If the temporarily determined short file name does not exist in either the root directory or the subdirectory, it is determined as a short file name (step S280). In this way, a short file name shorter than the long file name is determined.
上記の構成によれば、共通しているケースが少ない、変動しやすい下位カテゴリをファイルネーム冒頭に移動させることによって、ロングファイルネームの冒頭に識別性を持たせることができる。これにより、ショートファイルネームとして採用される、ロングファイルネーム冒頭部分は、ショートファイルネーム決定時に、通し番号をインクリメントするなどのループ処理が不要となる。したがって、ショートファイルネーム決定時の処理時間が短縮されるという効果が得られる。 According to the above configuration, the beginning of a long file name can be given distinctiveness by moving a subcategory that is less common and easily fluctuated to the beginning of the file name. This eliminates the need for loop processing such as incrementing the serial number at the beginning of the long file name adopted as the short file name when determining the short file name. Therefore, the effect that the processing time for determining the short file name is shortened can be obtained.
図2に示すように、最後に、ロングファイルネーム予備変換工程S210で変換し、ロングファイルネーム決定工程S230で決定したロングファイルネーム、および、ショートファイルネーム決定工程S280で決定したショートファイルネームを対応させて保存するファイルネーム保存工程(ステップS290)を行う。 As shown in FIG. 2, finally, the long file name converted in the long file name preliminary conversion step S210 and the long file name determined in the long file name determination step S230 and the short file name determined in the short file name determination step S280 are associated. Then, a file name storing step (step S290) is performed.
これらロングファイルネームおよびショートファイルネームは、図1の記録装置120に保存する。
These long file names and short file names are stored in the
保存されたファイルの検索をしようとするとき、ショートファイルネームには「時」「分」しか含まれないため、検索対象とするのは困難である。 When a saved file is to be searched, the short file name includes only “hour” and “minute”, so that it is difficult to search.
また、アプリケーションソフトウェアで用意するロングファイルネームが特に意味をなさないファイルネームである場合も、検索し難い。本実施形態はデジタルカメラを用いているが、ワープロや表計算ソフトウェアで保存されるファイルネームにも、本発明は応用できる。その際、「文書1」や「book1」などの、特に意味をなさないファイルネームがデフォルトで付与される場合は、検索の対象とし難い。 In addition, it is difficult to search when the long file name prepared by the application software is a file name that does not particularly make sense. Although the present embodiment uses a digital camera, the present invention can also be applied to a file name saved by a word processor or spreadsheet software. At that time, if a file name such as “Document 1” or “book 1” which is not particularly meaningful is given by default, it is difficult to search.
しかし、本実施形態のように、「時」「分」だけでなく「年」「月」「日」、つまりファイル作成時点を表すすべてのカテゴリで構成されているロングファイルネームを保存しておけば、ファイル検索がしやすい。 However, as in this embodiment, not only “hour” and “minute” but also “year”, “month” and “day”, that is, long file names composed of all categories representing the file creation time can be saved. File search is easy.
しかも、ショートファイルネームは、予備変換後のロングファイルネームの先頭の一部の文字列および通し番号で構成されるため、対応関係が一目瞭然なもの同士を対応させて保存することができる。 In addition, since the short file name is composed of a partial character string and serial number at the beginning of the long file name after the preliminary conversion, it is possible to store the corresponding ones whose correspondences are obvious at a glance.
一方、変換前の、上位カテゴリから下位カテゴリへと文字列が配列されるロングファイルネームは、ユーザにとっては感覚的になじみやすい場合が多いと考えられ、変換後のものより検索がさらにしやすいという利点がある。以上の観点から、変換前のロングファイルネームを保存して検索対象としてもよい。 On the other hand, long file names in which character strings are arranged from the upper category to the lower category before conversion are considered to be familiar to the user in many senses, and it is easier to search than those after conversion. There are advantages. From the above viewpoint, the long file name before conversion may be stored as a search target.
変換前のロングファイルネームを記録装置120に保存する場合も、ロングファイルネームとショートファイルネームの対応関係は、明確である。ショートファイルネームはロングファイルネームの一部を用いて作成されるからである。
Even when the long file name before conversion is stored in the
(ファイルネーム変換結果)
図3は、図1および図2に示した本実施形態によるファイルネーム変換結果を示す。図3(a)は第1の変換結果を示す。変換の基礎となるロングファイルネームを有するファイルは、同一「分」の間(すなわち1分以内に)に複数回撮影された画像ファイルである。
(File name conversion result)
FIG. 3 shows a file name conversion result according to the present embodiment shown in FIGS. FIG. 3A shows the first conversion result. A file having a long file name that is the basis of conversion is an image file that has been shot a plurality of times during the same “minute” (that is, within one minute).
このように、何枚の画像が同一「日時分」以内に撮像されようと、ショートファイルネームは冒頭から異なるものとなるため、既存のものと判定されることはなく、ステップS250またはS270からのループ処理・インクリメント(ステップS260)は行われない。したがって処理時間が大幅に短縮される。 In this way, no matter how many images are captured within the same “date and time”, the short file name is different from the beginning, so it is not determined that it is an existing one, and from step S250 or S270. Loop processing / increment (step S260) is not performed. Therefore, the processing time is greatly shortened.
図3(b)は第2の変換結果を示す。変換の基礎となるロングファイルネームを有するファイルは、同一の「時間」(すなわち、1時間以内に)複数回撮影された画像ファイルである。 FIG. 3B shows the second conversion result. A file having a long file name that is the basis of conversion is an image file that has been shot a plurality of times in the same “time” (that is, within one hour).
予備変換により、ロングファイルネームの「時間」と「分」の順番を、「分」を先にしたことによって、何枚の画像が同一「日時」以内に撮像されようと、ショートファイルネームは互いに異なるものとなり、既存のものとは判定されない。したがって、第1の変換結果と同様に、処理時間が大幅に短縮される。 With the pre-conversion, the short file names will not match each other no matter how many images are captured within the same “date and time” by setting the order of “hours” and “minutes” of the long file names to “minutes” first. It will be different and will not be judged as existing. Therefore, like the first conversion result, the processing time is greatly shortened.
図3(c)は第3の変換結果を示す。これは、別の「時間」で偶然「分」が一致したロングファイルネームを変換した例である。本実施形態の変換規則どおりに予備変換すると、ステップS250またはS270からのループ処理が行われ、通し番号がインクリメントされ(ステップS260)、ショートファイルネームに「~2」が出現する。 FIG. 3C shows the third conversion result. This is an example of converting a long file name that coincides with “minute” in another “hour”. When preliminary conversion is performed according to the conversion rule of the present embodiment, loop processing from step S250 or S270 is performed, the serial number is incremented (step S260), and “˜2” appears in the short file name.
この場合は、ループ処理が行われる分、ショートファイルネームの生成に時間を要する。しかしこのようなロングファイルネームが偶然生成されてショートファイルネームが重複するケースは格段に少ない。 In this case, it takes time to generate a short file name because the loop processing is performed. However, there are very few cases where such a long file name is accidentally generated and the short file name is duplicated.
図3(d)は第4の変換結果を示す。これは、端末の時計が動いていない場合の例である。端末の全メモリ消去操作を実行した後など、時計設定データがリセットされ、新たに設定し直さない限り、時間のカウントアップが行われない。そのような場合での変換結果である。 FIG. 3D shows the fourth conversion result. This is an example when the clock of the terminal is not moving. The time is not counted up unless the clock setting data is reset and newly set again, for example, after the terminal erases all memory. It is the conversion result in such a case.
変換前のロングファイルネームのチルダ後の番号しか違いが生じないため、本実施形態において特に効果がある例といえる。 Since only the number after the tilde of the long file name before conversion is different, it can be said that this embodiment is particularly effective.
(比較例)
図4は比較例としてのファイルネーム変換方法の動作を示すフローチャートである。比較例では、図2における予備変換(ステップS210)を行わない点が異なる。
(Comparative example)
FIG. 4 is a flowchart showing the operation of the file name conversion method as a comparative example. The comparative example is different in that the preliminary conversion (step S210) in FIG. 2 is not performed.
図5は、図4の比較例に、図3(a)に示すロングファイルネームを適用した変換結果を示す図である。比較例では予備変換を行わないため、同一「日」に作成されたファイルのロングファイルネームは、前半部が共通している。したがって、同一「日」に作成されたファイル数が増加するほど、ステップS250またはステップS270からのループ処理、すなわち仮決定したショートファイルネームが既存でないかどうかを確認する回数が増大し、動作が遅くなる根本原因となる。 FIG. 5 is a diagram showing a conversion result obtained by applying the long file name shown in FIG. 3A to the comparative example of FIG. Since the preliminary conversion is not performed in the comparative example, the first half of the long file names of the files created on the same “day” are common. Accordingly, as the number of files created on the same “day” increases, the number of times that the loop processing from step S250 or step S270, that is, whether or not the temporarily determined short file name is not existing, increases, and the operation becomes slower. Become the root cause.
比較例では、上述の第1〜第4の変換結果と同様のロングファイルネームをショートファイルネームに変換した場合、ループ処理がすべてのケースで必要となり、通し番号「~2」が出現することになる。 In the comparative example, when a long file name similar to the first to fourth conversion results described above is converted into a short file name, loop processing is required in all cases, and a serial number “˜2” appears. .
本実施形態では、これらの問題が回避され、繰り返し処理のループ数が極めて減少し、ショートファイルネームの生成時間が短縮される。しかも、ロングファイルネーム・ショートファイルネームの対応関係も、表記順序を変更したものであるため、明確である。 In this embodiment, these problems are avoided, the number of iteration loops is greatly reduced, and the generation time of the short file name is shortened. Moreover, the correspondence between the long file name and the short file name is also clear because the notation order is changed.
(実験結果)
以下に実験データを示す。
(Experimental result)
Experimental data is shown below.
日付設定が行われていない状態で、9枚連写し、その全件保存を50回実施した。これを実施した後の結果は、450件のフォトデータファイルが生成される。 Nine consecutive shots were taken with no date set, and all 50 were saved. As a result after performing this, 450 photo data files are generated.
(比較例の処理時間)
比較例に基づいてロングファイルネームの予備変換を行わない場合、全件保存にかかる時間の経緯として次のとおりになった。
15回目 10秒
30回目 114秒
40回目 198秒
50回目 310秒
このように、ファイル数の増加にしたがって、保存に要する時間は長くなり、50回目となると、310秒もの長時間を要した。
(Processing time of comparative example)
If the long file name was not pre-converted based on the comparative example, the time taken to save all cases was as follows.
15th time 10 seconds 30th time 114 seconds 40th time 198 seconds 50th time 310 seconds As described above, as the number of files increases, the time required for storage becomes longer, and for the 50th time, it takes 310 seconds.
(実施形態の処理時間)
本実施形態に基づいてロングファイルネームの予備変換を行った場合、全件保存にかかる時間の経緯として次のとおりになった。
15回目 4.2秒
30回目 4.7秒
40回目 5.3秒
50回目 5.9秒
このように、ファイル数が増大してもその保存に要する時間の増大はわずかであり、50回目の保存時でも、5.9秒で終了した。これは、ロングファイルネーム自体が予備変換され、前半部において異なっているため、ショートファイルネームの通し番号は増加することはなく、仮決定したショートファイルネームのサーチが速くなるからである。
(Processing time of the embodiment)
When preliminary conversion of long file names was performed based on this embodiment, the time taken to store all cases was as follows.
15th time 4.2 seconds 30th time 4.7 seconds 40th time 5.3 seconds 50th time 5.9 seconds In this way, even if the number of files increases, the increase in time required for storage is slight, and the 50th time Even at the time of storage, it was completed in 5.9 seconds. This is because, since the long file name itself is preliminarily converted and is different in the first half, the serial number of the short file name does not increase and the search for the temporarily determined short file name becomes faster.
(ファイルネーム変換プログラム、記録媒体)
上記の実施形態では、記録装置120にロングファイルネーム仮決定部150とショートファイルネーム決定部160とが予め含まれていたが、これらで構成されるアプリケーションプログラムは、単体で、ファイルネーム変換プログラムとして、あらゆるソフトウェアに適用可能である。すなわち、ファイル変換プログラムを記録した記録媒体によって、あらゆるソフトウェアに組み込み可能である。
(File name conversion program, recording medium)
In the above embodiment, the
以上、添付図面を参照しながら本発明の好適な実施例について説明したが、本発明は係る例に限定されないことは言うまでもない。当業者であれば、特許請求の範囲に記載された範疇内において、各種の変更例または修正例に想到し得ることは明らかであり、それらについても当然に本発明の技術的範囲に属するものと了解される。 Although the preferred embodiments of the present invention have been described above with reference to the accompanying drawings, it goes without saying that the present invention is not limited to such examples. It will be apparent to those skilled in the art that various changes and modifications can be made within the scope of the claims, and these are naturally within the technical scope of the present invention. Understood.
本発明は、ロングファイルネームをショートファイルネームに変換するファイルネーム変換方法および装置、ファイルネーム変換プログラムならびにかかるプログラムを記録した記録媒体に適用可能である。 The present invention is applicable to a file name conversion method and apparatus for converting a long file name into a short file name, a file name conversion program, and a recording medium on which such a program is recorded.
100 携帯情報端末
110 デジタルカメラ
120 記録装置
130 日付時刻ユニット
140 制御部
150 ロングファイルネーム仮決定部
152 ロングファイルネーム変換部
160 ショートファイルネーム決定部
170 ファイルアロケーションテーブル(FAT)
DESCRIPTION OF
Claims (8)
ファイル作成日時に関する上位のカテゴリから下位のカテゴリの、各カテゴリを表す文字列を順次配列したロングファイルネームを仮決定するロングファイルネーム仮決定工程と、
前記仮決定したロングファイルネームを、下位のカテゴリから上位のカテゴリへ、前記各カテゴリを表す文字列を順次配列したロングファイルネームに変換するロングファイルネーム予備変換工程と、
前記変換したロングファイルネームの先頭の一部の文字列および通し番号で構成される、該ロングファイルネームより短いショートファイルネームを決定するショートファイルネーム決定工程とを実行することを特徴とするファイルネーム変換方法。 Computer
And long file name provisional determination step of temporarily determined from the top of the category on the file creation date and time of a lower category, the long file name that was sequentially arranged a string representing each category,
The long filenames provisionally determined, from the lower category to a higher category, and long filenames preliminary conversion step of converting the long filename are sequentially arranged a string that represents each category,
A file name conversion comprising: executing a short file name determination step of determining a short file name shorter than the long file name, which is composed of a character string and a serial number at the beginning of the converted long file name Method.
前記仮決定したロングファイルネームを、下位のカテゴリから上位のカテゴリへ、前記各カテゴリを表す文字列を順次配列したロングファイルネームに変換するロングファイルネーム予備変換手段と、
前記変換したロングファイルネームの先頭の一部の文字列および通し番号で構成される、該ロングファイルネームより短いショートファイルネームを決定するショートファイルネーム決定手段とを含むことを特徴とするファイルネーム変換装置。 And long file name provisional determination means for temporarily determined from the top of the category on the file creation date and time of a lower category, the long file name that was sequentially arranged a string representing each category,
Long filenames that the temporarily determined, from the lower category to a higher category, and long filenames preliminary conversion unit that converts the long file name are sequentially arranged a string representing the respective categories,
A file name conversion device comprising: a short file name determining unit configured to determine a short file name shorter than the long file name, which includes a character string and a serial number at the beginning of the converted long file name. .
ファイル作成日時に関する上位のカテゴリから下位のカテゴリの、各カテゴリを表す文字列を順次配列したロングファイルネームを仮決定するロングファイルネーム仮決定工程と、
前記仮決定したロングファイルネームを、下位のカテゴリから上位のカテゴリへ、前記各カテゴリを表す文字列を順次配列したロングファイルネームに変換するロングファイルネーム予備変換工程と、
前記変換したロングファイルネームの先頭の一部の文字列および通し番号で構成される、該ロングファイルネームより短いショートファイルネームを決定するショートファイルネーム決定工程とを実行させることを特徴とするファイルネーム変換プログラム。 On the computer,
And long file name provisional determination step of temporarily determined from the top of the category on the file creation date and time of a lower category, the long file name that was sequentially arranged a string representing each category,
The long filenames provisionally determined, from the lower category to a higher category, and long filenames preliminary conversion step of converting the long filename are sequentially arranged a string that represents each category,
A file name conversion comprising: executing a short file name determination step of determining a short file name shorter than the long file name, which is composed of a character string and a serial number at the beginning of the converted long file name program.
ファイル作成日時に関する上位のカテゴリから下位のカテゴリの、各カテゴリを表す文字列を順次配列したロングファイルネームを仮決定するロングファイルネーム仮決定工程と、
前記仮決定したロングファイルネームを、下位のカテゴリから上位のカテゴリへ、前記各カテゴリを表す文字列を順次配列したロングファイルネームに変換するロングファイルネーム予備変換工程と、
前記変換したロングファイルネームの先頭の一部の文字列および通し番号で構成される、該ロングファイルネームより短いショートファイルネームを決定するショートファイルネーム決定工程とを実行させるファイルネーム変換プログラムを記録したことを特徴とする記録媒体。 On the computer,
And long file name provisional determination step of temporarily determined from the top of the category on the file creation date and time of a lower category, the long file name that was sequentially arranged a string representing each category,
The long filenames provisionally determined, from the lower category to a higher category, and long filenames preliminary conversion step of converting the long filename are sequentially arranged a string that represents each category,
Recording a file name conversion program for executing a short file name determining step for determining a short file name shorter than the long file name, which is composed of a character string and a serial number at the beginning of the converted long file name. A recording medium characterized by the above.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007198159A JP5122883B2 (en) | 2007-07-30 | 2007-07-30 | File name conversion method and apparatus, file name conversion program and recording medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007198159A JP5122883B2 (en) | 2007-07-30 | 2007-07-30 | File name conversion method and apparatus, file name conversion program and recording medium |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2009032208A JP2009032208A (en) | 2009-02-12 |
JP5122883B2 true JP5122883B2 (en) | 2013-01-16 |
Family
ID=40402611
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007198159A Expired - Fee Related JP5122883B2 (en) | 2007-07-30 | 2007-07-30 | File name conversion method and apparatus, file name conversion program and recording medium |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5122883B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2011048705A (en) * | 2009-08-28 | 2011-03-10 | Alpine Electronics Inc | File management system |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5765169A (en) * | 1996-09-30 | 1998-06-09 | International Business Machines Corporation | Method and apparatus for converting long file names to short file names |
JP2000187607A (en) * | 1998-12-24 | 2000-07-04 | Fujitsu Ltd | Name converting device and recording medium |
JP4468530B2 (en) * | 1999-12-28 | 2010-05-26 | 富士フイルム株式会社 | File management system, file management method, and storage medium |
JP2004185450A (en) * | 2002-12-05 | 2004-07-02 | Oki Electric Ind Co Ltd | Management method for long file name |
WO2006090606A1 (en) * | 2005-02-24 | 2006-08-31 | Konica Minolta Holdings, Inc. | File or directory name generation method and device thereof |
-
2007
- 2007-07-30 JP JP2007198159A patent/JP5122883B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2009032208A (en) | 2009-02-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5437557B2 (en) | Search processing method and search system | |
CN103593216B (en) | The system file of ubi forms is fabricated to factory's burning image file method | |
JP3554459B2 (en) | Text data registration search method | |
CN106980665B (en) | Data dictionary implementation method and device and data dictionary management system | |
JP2005302038A (en) | Method and system for renaming consecutive key in b-tree | |
JP5533083B2 (en) | Data processing apparatus and data processing method | |
JP2013137721A (en) | Controller, storage device, and program | |
JPH0779403A (en) | Electronic still camera | |
CN108446115A (en) | A kind of method and device of code reuse | |
JP5122883B2 (en) | File name conversion method and apparatus, file name conversion program and recording medium | |
US20100287331A1 (en) | Electronic device and method for recording power-on time thereof | |
JP2010182254A (en) | Apparatus and method for processing information, and program | |
JP6737117B2 (en) | Encoded data search program, encoded data search method, and encoded data search device | |
JP2006139676A (en) | Information management system | |
JP4416644B2 (en) | Character processing apparatus with prediction function, method, recording medium, and program | |
JP5629438B2 (en) | File management apparatus and control method thereof | |
US10353667B2 (en) | Information conversion method and information processing apparatus | |
CN101930451B (en) | For storing the method and apparatus of at least one inquiry data element of efficiently searching | |
CN105205069B (en) | Cache opening method and device based on paging file | |
JPH11312117A (en) | Memory management device and storage medium with memory management program stored therein | |
CN111176638B (en) | BIOS code variable conversion method, system, equipment and medium | |
JP2013077084A (en) | Sentence example dictionary generation program and sentence example dictionary generation device | |
JP4831398B2 (en) | Information processing apparatus and method, and program | |
JP5483166B2 (en) | Document search apparatus, document search method, and program | |
JP2009266128A (en) | Data comparison device and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20100615 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20120522 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20120711 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20121002 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20121025 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20151102 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
LAPS | Cancellation because of no payment of annual fees |