Retrieving files with invalid names (Users)
I now added some kind of "support" for files with invalid file names to my current RxDOS source code. When it's determined that the file name is invalid but the attributes show that this entry should be a file or directory (not a label/LFN/whatever), the file name is internally replaced by a representation of the directory entry's cluster and an index into the cluster. This is coded in digits 0..9 and letters A..V allowing to store 5 bits per character. Since a file name created that way is unique on the drive (as long as the directory entry doesn't move), it's unique within any given directory too. To insure that the name doesn't collide with actually existing (long or short) names in the same directory, the last character of the name is set to colon (:), which is an otherwise invalid character for both long and short names. Since the name is always zero-padded, that colon comes as the 8th character only, so the DOS name expansion code can tell it apart from an actual drive letter.
Besides the ability to see (using Find First/Find Next, aka DIR) and access (as long as the application doesn't do explicit file name checks itself) files with valid long file name only (whether DOSLFN installed/RxDOSLFN embedded or not), this method also works for any other file with corrupted file name and for files that aren't accessible because a character device with the same name is installed. (In MS-DOS, file searching with wildcards such as "DIR *.*" [or simply "DIR"] shows files and directories named as character devices but they aren't accessible.)
Since a name provided this way is actually invalid, renaming or moving the file to another place but with the same name won't work. Packing a file with such a name into an archive might be a bad idea too.
---
l
Complete thread:
- Accessing and/or creating files > 2 GB in DOS? - Zyzzle, 30.06.2009, 23:27 (Users)
![Open in board view [Board]](img/board_d.gif)
![Open in mix view [Mix]](img/mix_d.gif)
- Accessing and/or creating files > 2 GB in DOS? - RayeR, 01.07.2009, 02:28
- Accessing and/or creating files > 2 GB in DOS? - Zyzzle, 01.07.2009, 04:07
- Accessing and/or creating files > 2 GB in DOS? - ecm, 01.07.2009, 10:56
- Accessing and/or creating files > 2 GB in DOS? - Laaca, 01.07.2009, 14:41
- Accessing and/or creating files > 2 GB in DOS? - RayeR, 01.07.2009, 18:40
- Accessing and/or creating files > 2 GB in DOS? - Khusraw, 01.07.2009, 19:50
- Accessing and/or creating files > 2 GB in DOS? - RayeR, 02.07.2009, 12:46
- Accessing and/or creating files > 2 GB in DOS? - Khusraw, 01.07.2009, 19:50
- Accessing and/or creating files > 2 GB in DOS? - RayeR, 01.07.2009, 18:40
- Accessing and/or creating files > 2 GB in DOS? - Laaca, 01.07.2009, 14:41
- Accessing and/or creating files > 2 GB in DOS? - Rugxulo, 01.07.2009, 22:27
- Accessing and/or creating files > 2 GB in DOS? - Rugxulo, 01.07.2009, 22:26
- Accessing and/or creating files > 2 GB in DOS? - Zyzzle, 02.07.2009, 04:44
- Accessing and/or creating files > 2 GB in DOS? - Khusraw, 02.07.2009, 07:55
- Accessing and/or creating files > 2 GB in DOS? - Rugxulo, 05.07.2009, 21:34
- Accessing and/or creating files > 2 GB in DOS? - ecm, 06.07.2009, 12:15
- Accessing and/or creating files > 2 GB in DOS? - Rugxulo, 08.07.2009, 07:15
- Accessing and/or creating files > 2 GB in DOS? - ecm, 08.07.2009, 12:43
- Accessing and/or creating files > 2 GB in DOS? - Rugxulo, 08.07.2009, 07:15
- Retrieving files with invalid names - ecm, 13.08.2009, 12:10
- Accessing and/or creating files > 2 GB in DOS? - ecm, 06.07.2009, 12:15
- Accessing and/or creating files > 2 GB in DOS? - Zyzzle, 02.07.2009, 04:44
- Accessing and/or creating files > 4 GiB in DOS? - DOS386, 21.10.2009, 01:20
- Accessing and/or creating files > 2 GB in DOS? - RayeR, 01.07.2009, 02:28
Mix view