Solved Copying folders in command prompt.

ASRock K7VM2
June 6, 2007 at 15:32:33
Specs: Windows 98 SE, AMD Athlon 2000+/256MB

I have a directory with hundreds of subdirectories that I'd like to copy to an external hard disk. The problem is that my Windows 98 doesn't recognise the hard disk, so I have to do it in DOS. Is there any way to copy a directory and all its subdirectories and their contents at once? Apparently "copy *.*" only copies the files within a directory and not the subdirectories. Any help would be appreciated as I have no intention of copying hundreds of directories separately.

See More: Copying folders in command prompt.

Report •

June 6, 2007 at 16:34:53
✔ Best Answer

xcopy copies directories and folders. If you type "xcopy /?" (without the quotes) it should give you all the information about it. The same goes for any other dos commands.

Bear in mind that you will end up with files and folder names truncated to 8 characters. You have to make additional arrangements to handle hidden, system or read-only files (using attribs).


Report •

June 6, 2007 at 17:11:55

Is the issue that the drive that you want to copy to is NTFS? If so there are a couple of options. Explain what you are doing and maybe someone can give better suggestions. As waspointed out by Derek, using DOS will result in truncated names. This is less than ideal.

Report •

June 6, 2007 at 17:14:47

Are you sure dos sees the drive? I don't understand how dos can see it but windows can't. Is it running in msdos compatibility mode?

Anyway, if you copy the files in pure dos, such as booting directly into dos or exiting windows into dos, then as Derek says, it's going to copy them all in 8.3 format. But if you're in 98 and open up a dos window to do the copying, it'll copy them correctly.

Report •

Related Solutions

June 6, 2007 at 17:38:15

"The problem is that my Windows 98 doesn't recognise the hard disk, so I have to do it in DOS" is curious to me as well. What exactly do you mean?

Life's more painless for the brainless.

Report •

June 6, 2007 at 18:26:55

"I don't understand how dos can see it but windows can't."

I'm glad it's not just me.

If at first you don't succeed, you're about average.


Report •

June 7, 2007 at 02:18:14

there is a tool called lcopy that can be used to copy folders while preserving long file names in pure DOS.
do a google search and you will find it

Report •

June 7, 2007 at 09:43:48

Thank you for your responses. Yes, xcopy was what I was looking for. The eight-character limit is rather annoying though. I think it does have something to do with the drive type. When I look up the properties in Windows, it says it's FAT, and not NTFS. I don't know if that's because it actually is FAT or because Windows 98 doesn't recognise recognise NTFS at all. If it is FAT, that would explain why it works in DOS.
I have no idea how to change the drive type though. I did some research, and apparently there are lots of ways, but they all seem to be for Windows 2000 and up.

Report •

June 7, 2007 at 10:03:12

I think you are going about your issue the wrong way. If you would post exactly what the entire problem is perhaps someone could suggest an easier way to accomplich the task. If the drive isn't recognised in Win98 how do you know it is FAT? Is this drive installed in a Win98SE computer? Is the drive in question properly identified in the POST screens at startup? If the drive is formatted with FAT you should be able to access it. Possibly a drive overlay.
Knoppix would be another option that should retain long file names.
The 8 character limit is a dos parameter. Predates all versions of Windows. You MAY end up with multiple files that won't be readily identifyable. If you do proceed it might be benificial to look into the program mentioned in response #6.

Report •

June 7, 2007 at 11:44:20

What is on this drive, general data, an operating system, or both? If W98 was previously running from it then it will be FAT32.

As said by others, a bit of background info would mean we could suggest the best way forward.


Report •

June 10, 2007 at 05:36:19

just zip it in windows

copy the zip fil in dos

the long file names will be preserved

Report •

June 10, 2007 at 06:01:00

unzipping in DOS should be done only after loading something like doslfn, that enables lfn.
otherwise the long file names would be lost

my signature does not look like this

Report •

Ask Question