I may be wrong here, but I feel sure that "space" is not a valid leading character in a directory name, so you will not be able to access it under the current name. You can use the disk edit function in, for example, Norton Utilities or PC Tools to edit the directory entry and change it into a valid character, like a letter.
Contrary to popular belief, spaces are legal tokens for filenames in any form of FAT (FAT12, FAT16, FAT32) under MS-DOS. OS/2, for instance, is notorious for hiding system files on FAT partitions with names like "EA DATA. SF" and "WP ROOT. SF". I often use spaces in directory names (in addition to the 3 character extension.) As a result, I get no overhead on the file allocation table, while still having readable names in pure DOS. Directories with spaces are just a tad trickier to work with.
Obviously your directory cannot possibly be named " PROGRAMS", as that is 9 characters including the leading space. I will assume you meant " PROGRAM.S" for the time being since that is valid. Simply issue the following command in DOS 6.x:
REN ?PROGRAM.S NEWNAME
If that doesn't work, find a Windows 95 (or 98) boot disk, browse to the directory and issue the following:
REN " PROGRAM.S" NEWNAME
Most problems with seemingly "invalid" filenames can be resolved without the use of a disk editor.
C:\temp\->dir /s/b C:\temp\-\abc.txt C:\temp\-\xbc.txt *** So in this case it's not so much a first char indicating a deleted file as a customary "wildcard".
I'm in NT CMD, but I'll bet money it acts the same in DOS.
M2
If at first you don't succeed, you're about average.
"A "?" in the beginning of the filename is a reserved character, to indicate to the OS that the file is deleted."
No, it's the wildcard for a single character - although a few 'undelete' programs will show a question mark, the first character of a deleted file is the lower case sigma (HEX e5)
Life is hard; it's harder if you're stupid. -John Wayne
Wow, thanks for all the advice from all of you, but I still am unable to perform the task I am trying to complete.
Perhaps I should define what I am trying to do in more detail.
I have a DOS 6.2 machine that is being used to control a piece of equipment in a semiconductor fab. This tool, and the pc are about 10 years old, so the manufacturer offers basically no support for the software, or the tool. I am trying to copy the contents of the hard drive so as create a "backup" on my network.
I have been able to copy all system files and most directories using xcopy. However there are (4) directories that are hidden directories, that have a space, or hidden character as the lead character. So I can not copt these directories as xcopy only copies unhidden files. If I could change the attribute of the directory I could copy. but again I can not access then due to not knowing the correct name. I am sure the manufaturer of the tool did this to make them inaccessable, but I now have no support from them, and would like to access these (4) directories.
I am running WINNT4.0, SP6 and dual booting to MS-DOS6.22 with Windows for workgroups 3.11. My first questions would be, if the directories are hidden, how do you know their names and that the first character start with a space. I was trying to duplicate your situation. Using the File Manager with WINNT, I created (on my D drive) a directory _Dog (the underscore is really a apace). This version of file manager supports long file names. If fact, that is the default. Then went to "View," "All File Details" and file manager will show DOG~1 as the MS-DOS file name.
At the WINNT D:\> command prompt, I entered the "dir" command. Directory did not show up. Then,
attrib -H D:\?Dog and got "File not found - D:\?Dog Then,
attrib -H D:\" dog" and got D:\>. Then the "Dir" command and the _Dog directory show up (the underscore is really a apace).
If you want to, you can move and/or rename the directory using
move D:\" dog" D:\mydog
Change the directory back to dog (with the space thing and make it a hidden.
At a MS-DOS 6.22 D:\. prompt enter
attrib -H D:\>Dog~1
The directory can now been seen under DOS. Yes, it is possible to have a directory _Programs (the underscore is really a apace). But, the MS-DOS file name will be PROGRA~1.
Microsoft article ID: 142982 give some additional information on "How Windows Generates 8.3 File Names from Long File Names".
The information on Computing.Net is the opinions of its users. Such
opinions may not be accurate and they are to be used at your own risk.
Computing.Net cannot verify the validity of the statements made on this site. Computing.Net and Computing.Net, LLC hereby disclaim all responsibility and liability for the content of Computing.Net and its accuracy.
PLEASE READ THE FULL DISCLAIMER AND LEGAL TERMS BY CLICKING HERE