Can I 'export' a directory tree plus contents?

  [DELETED] 16:53 01 Sep 2003


I believe I read somewhere on this forum about a way of exporting a directory tree complete with all subdirectories and files in either text format or something similar using DOS.... or was I mistaken?

I can't find it.

Any one know how to accomplish this?


  [DELETED] 18:25 01 Sep 2003

^ bump ^

  xania 11:05 02 Sep 2003

What do you mean by 'exporting'? If you want to move a directory structure using DOS commands, you need a command like this, assuming you want to move c:\a and all its structures to D:

cd a:
xcopy *.* d:\ /s

xcopy rather than copy so that you can move all types of files and /s to pick up and process all sub-directories

If you need to quote names longer than 8 characters, use quotes arond the entire pathnames.

If this is not clear, please provide details of exactly what you want to move to where, and I will write a script for you.

But also click here

  [DELETED] 11:18 02 Sep 2003

I know this isn't exactly what you are asking but you can add it to a Winzip archive and save it that way through windows, keeping all directory tree information intact.

  [DELETED] 11:59 02 Sep 2003

dir /s > FileList.txt

From DOS will make a simple list of the contents. The /s switch includes all subdirectories of the current directory.

If you just want the names and no details, use the /b switch as well (for a bare listing)

dir /s/b > temp.txt

Last time this question was asked someone came up with a shareware program to do it, but I cannot remember what it was called. Try searching Google for File utilities or directory listing.

  [DELETED] 12:20 02 Sep 2003

"dirlist" the name of that utility.
Why do you need to do this in DOS ?

  [DELETED] 12:27 02 Sep 2003

You have to open a DOS box (I am not sure if you can still do that in XP). Type "dir" and pressing enter will simply list the contents of the current folder. /s includes subdirectories, /b excludes file details, > redirects the output from the screen, "FileList.txt" receives the output of the "dir" command.

  [DELETED] 13:17 02 Sep 2003

click here provided by Google.

  [DELETED] 20:31 04 Sep 2003

Thanks for all the input people. Much appreciated.

I am running a dual-boot OS system: 98SE and XP Home.

All my saved music CD files are on a separate HDD and rather than getting pen and paper to write out all the detail (for my own record and insurance purposes), I'd like to be able to simply export all the detail on the drive directory which I can then save as a spreadsheet.

Writing out the artist names, album names and track names etc would be such a tiresome chore at this stage in the game.....

It is possible to switch drives (not directories) while in DOS? i.e. say from drive 'X' to drive 'Y'?

  [DELETED] 21:33 04 Sep 2003

Have a look at this post click here

Is any of that any good for what you want to do?

  [DELETED] 21:45 04 Sep 2003

you would just type D:\ or E:\ as appropriate, and press enter, but since you want to output your directory listing from a CD to a text file you should do it from the C: drive so that your text file can be written.

DIR D:\ /s > Files.txt would list all of the files in all directories on a CD in drive D: Open files.txt in Word to tidy it up, or use the DIRlist utility.

The file will be saved in the current directory which is usually C:\Windows

CD \ {Enter} will make the root directory the default. CD \Mydocu~1 {Enter} to Change Directory (CD) again to C:\My Documents.

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

Elsewhere on IDG sites

Microsoft Surface Book 2 15in review

How to create explosive dance music graphics

When is the best time to buy an iPhone?

Quel antivirus gratuit choisir pour un PC ?