copying a directory in DOS

  dimercaprol 22:23 22 Jan 2004

I have recently copied a folder from one disc to another using COPY in DOS as I could not get Windows to start. However, the folder is now saved as a file on the new disc - it is the same size i.e. 12 MB but I cannot open it as it is no longer behaving as a folder but as a file that cannot be opened. Have I lost my data or is it retrievable somehow?
Thanks in advance for any help.

  DieSse 23:30 22 Jan 2004

How did you copy it? The correct syntax goes something like this.

xcopy d:\folder\*.* c:\folder\ /e
This would copy the directory named folder on drive D to drive C , including all the folder contents and any subdirectories including empty ones.

xcopy should be used to preserve long file names

It's better to create the folder on the C drive first, though specifying exactly as above should avoid this.

  Pesala 00:17 23 Jan 2004

I hope I’m wrong, but I suspect that what you did was something like this:

COPY *.* Backup

However, you did not create a folder first named Backup first, so the files were combined into one.

If they were plain text files it would be possible to rename the file to backup.txt and open it in Wordpad. Otherwise, you will need someone more clever than me.

  woodchip 00:22 23 Jan 2004

What Windows OS

  DieSse 00:27 23 Jan 2004

"What Windows OS"

?? - it was DOS

  dimercaprol 13:44 23 Jan 2004

I used:

copy c:\mydocu~1\folder d:\folder

It sounds from what you are saying that I have lost the stuff since I did not use the " *.* "
They were not all text: there were a couple of scanned images and a couple of files produced in Power Publisher (made by Green Street Publishing).

  DieSse 13:53 23 Jan 2004

You actually lost the stuff because you didn't put a \ after the target directory - this makes it copy to a file, instead of a folder.

You also need to use xcopy, too, to preserve file names correctly.

  mrdsgs 14:06 23 Jan 2004

isn't it :

xcopy c:\mydocu~1\folder\*.* a:

this would copy all of the folder directory to a:

adding /s after *.* would include all subfolders, hence:

xcopy a:\*.* /s c:

would copy everything on the floppy to c: and keep files and folder names intact.


  Pesala 14:51 23 Jan 2004

I tried a similar method from a folder containing 761 Kbytes of Page Plus DTP files, various wmf and jpg graphics, a couple of *.reg files and a *.txt file.

I renamed the resulting 4 Kbytes file with a *.txt extension and opened it in Wordpad. All that was readable was the text and reg files. Most of the rest was not even copied, except for the file headers, which are gobbledygook.

Perhaps you might be able to salvage any text stories in the GST Publisher files by renaming your "Folder" file to "folder.txt" and opening in WordPad. It would depend on the file format. If your file is 12 Mbytes, there might some salvagable text in there worth having. Just cut and paste what you want to a new document.

  dimercaprol 16:29 23 Jan 2004

Thanks for the advice, everyone.

  woodchip 17:37 23 Jan 2004

Why cannot Windows be started, hence my post on what OS

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

Xiaomi Mi Mix 2 review

What went wrong at the Designs of the Year 2017

iPhone X news: Release date, price, new features & specs

Comment regarder des séries et talk-shows américains en France ?