Copy Multiple Folders but not Contents Onto a New Disk?

Dennis Faas's picture

Infopackets Reader Cara J. writes:

" Dear Dennis,

I enjoy your newsletter greatly. I've been saving documentation on a 100 megabyte ZIP disk, which there are multiple folders I've created. I'm running out of space on this particular ZIP disk and will have to start using a new one soon. Question: is there a way to copy just the folders (and not the contents) from the first disk to a new one? I'm particular about the way I file my information and would like to use the same method on the new disk. Any help would be appreciated! "

My response:

This is an odd question, however, it is possible, and can be accomplished using an MS DOS Command Prompt via Start -> Programs [MS DOS] or Start -> Programs -> Accessories -> Command Line.

The program that would copy your folders (and not the contents) would be done using "xcopy", and it works from the DOS command line. As XCopy help states, "/T Creates directory structure, but does not copy files. Does not include empty directories or subdirectories. /T /E includes empty directories and subdirectories."

So, for example, if you double clicked on My Computer and found that your ZIP drive was using drive letter F, you would first need to copy the empty folders temporarily to C drive, and then back to a new ZIP disk using the F drive. Here are the commands you need to enter in the DOS Windows to do it:

  • C:
  • mkdir \zip_disk
  • xcopy /t /e F:\*.* C:\zip_disk
  • xcopy /t /e C:\zip_disk F:\

Side note: In simple English, the above DOS commands say: [line 1] change to C drive, [line 2] make a directory on C drive called zip_disk, [line 3] using the xcopy command, copy all folders (but not the contents) from the F: drive to the folder C:\zip_disk, [line 4] copy all the empty folders from C:\zip_disk to the F: drive.

I tried the above commands myself and it worked. If you need to substitute drive letters using the example above, copy and paste what I have into NotePad (Start -> Programs -> Accessories -> NotePad), make the adjustments, then open a DOS Window and then paste each line 1 at a time into the DOS Window using your mouse.

Should you decide to manually type in any of the commands, note that they must be exact or the entire process will fail (which is why it would be a better idea to copy and paste the commands with your mouse).

Rate this article: 
No votes yet