Go Back   PCMech Forums > Windows Support > Windows Legacy Support (XP and earlier)

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 12-06-2004, 10:59 PM   #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
cbrown is offline   Reply With Quote
Old 12-06-2004, 11:17 PM   #2
Member (14 bit)
Premium Member
 
TwoRails's Avatar
 
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
TwoRails is offline   Reply With Quote
Old 12-07-2004, 03:03 AM   #3
Member (10 bit)
 
Join Date: Jul 2002
Location: Trivandrum, India
Posts: 800
Send a message via Yahoo to pillainp
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
pillainp is offline   Reply With Quote
Old 12-07-2004, 06:12 AM   #4
Member (11 bit)
 
Mac Medic's Avatar
 
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
Mac Medic is offline   Reply With Quote
Old 12-07-2004, 07:30 PM   #5
Member (14 bit)
Premium Member
 
TwoRails's Avatar
 
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.
TwoRails is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 10:11 PM.
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.6.0