MS-DOS directory names with spaces help?

Discuss MS-DOS, Windows 1, 2 and 3.
Post Reply
ComboOfWombo
Posts: 22
Joined: Mon Mar 21, 2016 12:55 am
Location: Frisco, TX

MS-DOS directory names with spaces help?

Post by ComboOfWombo »

So I'm screwing around with an old All-In-One Windows ISO from 2003 that contains every version of Windows up to Server 2003, and the directory names in this ISO have spaces, which doesn't allow me to get to that directory in DOS. Can someone tell me how to get around spaces in DOS directories?
Wake me up when Chicago build 34 leaks or something...

Wheatley
User avatar
Donator
Posts: 1839
Joined: Thu Oct 25, 2012 8:19 pm
Location: shell32.dll

Re: MS-DOS directory names with spaces help?

Post by Wheatley »

"Surround the directory in quotes."
Windows Defender for great justice! Bugs are an international trading company. I need to defeat the anti-debugging and obfuscation methods. It wasn't for Intel's absurd ability to load in ie6. Why even waste time with people in an envelope?

JackArchive
User avatar
Posts: 65
Joined: Tue Feb 28, 2017 10:21 pm
Location: C:\Users\JackArchive\

Re: MS-DOS directory names with spaces help?

Post by JackArchive »

Wheatley wrote:"Surround the directory in quotes."
Yeah, just surround in quotes (Yeah that's for Windows and not DOS; I misinterpreted that one). Also, on UNIX or any system based on it, backslashes\ are\ used\ if\ I\ remember\ correctly.
Last edited by JackArchive on Sat Mar 18, 2017 1:39 am, edited 1 time in total.
-=JackArchive=-
Preserving since the last time we all partied like it's 1999...

xelloss
User avatar
Donator
Posts: 400
Joined: Sun Aug 18, 2013 7:26 pm
Location: Edinburgh, Scotland

Re: MS-DOS directory names with spaces help?

Post by xelloss »

Wheatley wrote:"Surround the directory in quotes."
Just because DOS looks like a Windows command prompt, that doesn't mean it understands quotes.

ComboOfWombo
Posts: 22
Joined: Mon Mar 21, 2016 12:55 am
Location: Frisco, TX

Re: MS-DOS directory names with spaces help?

Post by ComboOfWombo »

xelloss wrote:
Wheatley wrote:"Surround the directory in quotes."
Just because DOS looks like a Windows command prompt, that doesn't mean it understands quotes.
Thank you! Every solution I've found upon Google searching was meant for Windows CMD, and like you said, quotes don't work in DOS! It throws up something along the lines of, "Unknown parameters"
Wake me up when Chicago build 34 leaks or something...

Battler
User avatar
Donator
Posts: 2117
Joined: Sat Aug 19, 2006 8:13 am
Location: Slovenia, Central Europe.
Contact:

Re: MS-DOS directory names with spaces help?

Post by Battler »

You can't get around that. Recreate the ISO without long file names.
Main developer of the 86Box emulator.
Join the 86Box Discord server, a nice community for true enthusiasts and 86Box supports!

The anime channel is on the Ring of Lightning Discord server.

Check out our SoftHistory Forum for quality discussion about older software.

ComboOfWombo
Posts: 22
Joined: Mon Mar 21, 2016 12:55 am
Location: Frisco, TX

Re: MS-DOS directory names with spaces help?

Post by ComboOfWombo »

That's what I was afraid of. Thanks for the help!
Wake me up when Chicago build 34 leaks or something...

xelloss
User avatar
Donator
Posts: 400
Joined: Sun Aug 18, 2013 7:26 pm
Location: Edinburgh, Scotland

Re: MS-DOS directory names with spaces help?

Post by xelloss »

Battler wrote:You can't get around that. Recreate the ISO without long file names.
Actually, he could XCOPY the content of the CD to the hard drive, then rename directories using wildcards like this:

C:\>MOVE A?NAME A_NAME

c:\a name => c:\a_name [ok]

Of course this cannot be done on readonly media.

OldMac
Posts: 28
Joined: Sat Feb 04, 2017 12:59 am

Re: MS-DOS directory names with spaces help?

Post by OldMac »

When LFN support first came out it still needed to be backwards compatible with DOS so LFNs would be stored also as something like SHORTN~1. If you're accessing the disc from an old enough version of DOS that it doesn't support LFN you should be able to see those short names in the directory listing. If the directory listing shows the longer names including spaces then the version of DOS you're using supports accessing LFNs and you should be able to put quotes around the name.

os2fan2
User avatar
Donator
Posts: 1394
Joined: Sun Dec 30, 2007 8:12 am
Location: Brisbane, Queensland
Contact:

Re: MS-DOS directory names with spaces help?

Post by os2fan2 »

You can access spaces under the CMD prompt of OS/2 or Windows, but DOS is different to just the 'command prompt'.

Microsoft called the CMD prompt the 'dos prompt', and people have been confusing the two eversince. Under OS/2, there's an 'os/2 prompt' and a 'dos prompt', and no one ever confused the two.

You can generally manipulate spaces if the command supports wild cards, eg 'ren WP?DATA.?SF WP_DATA._SF. If you can't use wild-cards, it's really a no-go. Even using rabbit-ears won't work. You would be better off using something like an OS/2 prompt.

Another thing is that browsing with COMMAND.COM won't show directories that don't fit 8.3, even if there is no spaces. eg, DOS won't change to a directory WORKPLACE, because that has 9 letters, and most DOS versions don't understand the VLFN hack of microsoft dos 7+.

If you really want to fiddle with directories under DOS, you need to pull them with an NT or OS/2 or linux command. Make sure it understands the joliet or rock-ridge extensions to the cdrom.

carbonx
Posts: 5
Joined: Wed May 28, 2014 12:28 pm

Re: MS-DOS directory names with spaces help?

Post by carbonx »

I am afraid a file named "testfile123456.txt" -> "testfi~1.txt"
And a directory "oldjoessecretdokuments" would be "oldjoe~1"

os2fan2
User avatar
Donator
Posts: 1394
Joined: Sun Dec 30, 2007 8:12 am
Location: Brisbane, Queensland
Contact:

Re: MS-DOS directory names with spaces help?

Post by os2fan2 »

DOS itself would not see long file names. If you put oldjoesecretdocuments on a cdrom, DOS simply would not see it. Even the Windows 9x command.com can't see the full long file name under DOS.

The joliet file system was supposed to get around this series.

You could use something like ldir and lren to work around this.

Post Reply