Discussion forum for all Windows batch related topics.
Moderator: DosItHelp
-
Faith
- Posts: 1
- Joined: 04 Mar 2011 08:06
#1
Post
by Faith » 04 Mar 2011 08:13
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

-
!k
- Expert
- Posts: 378
- Joined: 17 Oct 2009 08:30
- Location: Russia
#2
Post
by !k » 04 Mar 2011 09:44
If folder's names have not dots
otherwise
Code: Select all
dir /a:d /b > list.txt
dir *.avi /b >> list.txt
-
scienceguru1.bat
- Posts: 44
- Joined: 01 Jan 2011 20:54
#3
Post
by scienceguru1.bat » 17 Mar 2011 19:41
if you also want the contents of the subfolder under "clips", then add:
right after the
in !k's script above