|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member (1 bit)
Join Date: Dec 2004
Posts: 1
|
dos filename more than one work
Hello.
I am running DOS on a Windows 2000 Professional machine. I have a file on my desktop that I want to access named 'New Text Document.txt'. Since DOS will not allow me to open this file using that name (because of the spaces) how would I open this file? Thanks, Chris --Sorry if this question sounds stupid. ex. Code:
more New Text Document.txt |
|
|
|
|
|
#2 |
|
Member (14 bit)
Premium Member
Join Date: Jan 2002
Location: The Great NorthWest
Posts: 12,594
|
Hi cbrown,
Welcome to PC Mechanic !! ![]() I don't know about W2K, but in XP you can list the directory in the command line with the "/x" switch to show the files in the directory and it will show the DOS name as well. I created a file, 'New Text Document.txt' as per you example, and it shows as: NEWTEX~1.TXT You results may vary. HTH TwoRails |
|
|
|
|
|
#3 |
|
Member (10 bit)
|
cbrown,
There are two ways you can solve this problem. 1) Since DOS uses the 8.3 system for file names (8 characters for file name and 3 for the extension), it will, as TwoRails says, name any file with a longer name using the following convention: Remove spaces in the file name and use the first 8 characters and the new DOS-only filename: if more than one file exists that share the same first 6 characters (eg. New Text Document.txt and New Text.txt), DOS will name the files NEWTEX~1.txt and NEWTEX~2.TXT. You can then search in the directory using that file name. Or you could use the "*" or "?" wildcards to locate all those files. 2) In CMD as seen in Win2K and WinXP, you can enclose the whole file name (including spaces) within quotes and then issue a DIR or EDIT command: eg: DIR Desktop\"New Text Document.txt" Hope that helps, NPP
__________________
[FONT=Arial][SIZE=1][COLOR=Navy][CENTER]Intel Core2Quad Q9550; EP45-UD3R (rev 1.1); 4x2GB DDR2 800MHz; eVGA e-GeForce 9600GT KO 512MB DDR3; Seagate ST31000528AS 1T, Seagate ST3500320AS 500GB SATA II, Seagate ST3500418AS 500GB SATA II; LG GH22-NS50 DVD-RAM x 2; DELL SP2208WFP; Windows 7 Ultimate 64-Bit Palm LifeDrive Mobile Manager |
|
|
|
|
|
#4 |
|
Member (11 bit)
Join Date: Jul 2002
Posts: 1,729
|
This may be a daft answer, but why not just rename the file?
__________________
Better to use a Mac and be THOUGHT a fool, than to use Windows and REMOVE ALL DOUBT |
|
|
|
|
|
#5 |
|
Member (14 bit)
Premium Member
Join Date: Jan 2002
Location: The Great NorthWest
Posts: 12,594
|
That would work for a file or two, but if cbrown is dealing with a bunch of files, then renaming them would get frustrating and out of hand.
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|