Page 1 of 1

Listing of x folder's content?

Posted: 04 Mar 2011 08:13
by Faith
Hi,

I have a folder called "clips", inside this folder are .avi clips and folders (folders are empty). How would I go about listing the folder names and the .avi names into a simple text document? So:

examplefolder1
examplefolder2
example1.avi
example2.avi

I don't want the script to rename anything, I just want it to list the all the folders and .avi clips. Can this be done via batch?

Thanks :)

Re: Listing of x folder's content?

Posted: 04 Mar 2011 09:44
by !k
If folder's names have not dots

Code: Select all

dir /b /o:e > list.txt

otherwise

Code: Select all

dir /a:d /b > list.txt
dir *.avi /b >> list.txt

Re: Listing of x folder's content?

Posted: 17 Mar 2011 19:41
by scienceguru1.bat
if you also want the contents of the subfolder under "clips", then add:

Code: Select all

/s

right after the

Code: Select all

/b

in !k's script above