Two different names to the same file

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
misvin
Member
Member
Posts: 112
Joined: 2010-08-14, 11:25 UTC

Two different names to the same file

Post by *misvin »

What is the best solution to find a file by the old or a new name?

Assume that I have downloaded or got by e-mail a file, and I want to provide a more meaningful name, but I also want to keep ability to find it by its old name.

Please note that the file can be stored inside of 7zip archive.
User avatar
Stefan2
Power Member
Power Member
Posts: 4155
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Post by *Stefan2 »

Just make a zero size text file.

old name.ext 123 kB
old name.ext.txt 0 kB
new name.ext 123 kB


Also you can drop the txt extension
old name.ext 0 kB
new name.ext 123 kB




 
misvin
Member
Member
Posts: 112
Joined: 2010-08-14, 11:25 UTC

Post by *misvin »

Stefan2 wrote:Just make a zero size text file.

old name.ext 123 kB
old name.ext.txt 0 kB
new name.ext 123 kB


Also you can drop the txt extension
old name.ext 0 kB
new name.ext 123 kB
 
I don't want to use 2 files: old name.ext and new name.ext.
Also your solution doesn't have relation between 2 filenames.

Can I store and find information about the previous name in the new file (new name.ext)?
User avatar
Stefan2
Power Member
Power Member
Posts: 4155
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Post by *Stefan2 »

misvin wrote:Can I store and find information about the previous name in the new file (new name.ext)?
Only on files which support meta data, like MP3 and JPG.





Alternatively you can use file comments with the "descript.ion" file.

Search the help for "Edit comment"
Allows to set or change a file comment stored in a file called descript.ion or files.bbs.
Comments can be displayed with Show - Comments (Ctrl+Shift+F2) within the file lists,
or by moving the mouse over a file name
This is one single additional file per folder.



 
User avatar
Hacker
Moderator
Moderator
Posts: 13064
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

misvin,
Well, you could us both names in one, like "oldname # newname.txt". Or you could use hard links, where two different file names point to the same content.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
Gral
Power Member
Power Member
Posts: 1467
Joined: 2005-01-26, 15:12 UTC

Post by *Gral »

In my opinion there is no one best solution.
Use hard links for real file system, pack as two independent files with 7zip.
Needs small amount of additional space for two binary identical files.
sorcar
Member
Member
Posts: 100
Joined: 2005-04-12, 17:45 UTC
Location: U.S.

Using ADS for preserving the original file name

Post by *sorcar »

I don't want to use 2 files: old name.ext and new name.ext.
Also your solution doesn't have relation between 2 filenames.
You can save the old file name as an alternate data stream. This presupposes you will confine yourself in ntfs.
A wonderful plugin, http://www.totalcmd.net/plugring/NTFS_diz.html can save multiple such names, which you can view through custom columns. That presupposes you will use TC to copy for preserving the comment and remain in ntfs.

Agreed with Gral that:
[T]here is no one best solution.
Suite yourself.
misvin
Member
Member
Posts: 112
Joined: 2010-08-14, 11:25 UTC

Post by *misvin »

1. Thanks to all of you.

2. In the meantime, the best solution (for me) is to store the file with old name inside 7zip archive file, and rename <old_name.7z> to <new_name.7z>.


3.
Stefan2 wrote: Alternatively you can use file comments with the "descript.ion" file.
Limitation 1: A user can't copy+paste via Explorer.
Limitation 2: Comments only work with normal files, not with files in archives.
Limitation 3: To find file, you should search twice: regular search for <new_name> file, and search for text (<old_name>) in descript.ion files.


4.
Hacker wrote: Well, you could us both names in one, like "oldname # newname.txt".
Disadvantage: long filenames.
In the "Name" column I want to see the new filenames only.
The old filename may be required only in rare cases (for searching or analyzing data).
Hacker wrote: Or you could use hard links, where two different file names point to the same content.
Limitation 1: Hard links only work with normal files, not with files in archives.
Limitation 2: In the "Name" column I want to see the new filenames only.

5.
sorcar wrote:You can save the old file name as an alternate data stream. This presupposes you will confine yourself in ntfs.
A wonderful plugin, http://www.totalcmd.net/plugring/NTFS_diz.html can save multiple such names, which you can view through custom columns. That presupposes you will use TC to copy for preserving the comment and remain in ntfs.
Does it say that all information in alternate data streams (ADS) is lost when a user try to:
5.1. Add files to archive (7z)
5.2. Upload and synchronize files with ADS on OneDrive, Google Drive, Dropbox cloud storage.
5.3. Send, receive, open files with ADS by mail (GMail, Yahoo, Hotmail, Exchange Server).
User avatar
Hacker
Moderator
Moderator
Posts: 13064
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

misvin,
misvin wrote:
Hacker wrote:Or you could use hard links, where two different file names point to the same content.
Limitation 1: Hard links only work with normal files, not with files in archives.
Well, they are both archived but in the 7z format the link status is lost.
misvin wrote:
sorcar wrote:You can save the old file name as an alternate data stream. This presupposes you will confine yourself in ntfs.
A wonderful plugin, http://www.totalcmd.net/plugring/NTFS_diz.html can save multiple such names, which you can view through custom columns. That presupposes you will use TC to copy for preserving the comment and remain in ntfs.
Does it say that all information in alternate data streams (ADS) is lost when a user try to:
5.1. Add files to archive (7z)
-sns

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Post Reply