Page 1 of 1

list of foler and filenames

Posted: 13 Sep 2009 22:01
by berky93
hello. I created a batch script that backs up certain folders and files. I want to add a command that will create a text file within the backup drive with a list of all folders and files within a specific folder in it. how would I go about doing this?

Example:

_________________________

| files.txt.....................[_][O][X]|
|--------------------------------------|
|folder1....................................|
|folder2....................................|
|folder3....................................|
|file1.........................................|
|file2.........................................|
|file3.........................................|
|file4.........................................|
|________________________|

(like my ASCII art?)

Posted: 14 Sep 2009 11:02
by avery_larry
dir /b /s "d:\parent folder">file.txt

Posted: 14 Sep 2009 18:35
by berky93
I tried that command, and it created the text file, but it didn't put any text in it.

Posted: 14 Sep 2009 20:14
by berky93
nevermind, I got it working...


wow, it showes everything huh?

Posted: 15 Sep 2009 10:27
by avery_larry
Everything you could ever want to know about dir:


http://ss64.com/nt/dir.html