New
#1
DOS - how to create list of directories without a particular file extn
hi,
I'm hoping someone can help me perfect a script/batch file etc that will list my folders that do NOT have a particular file extension in it, currently I've been using something similar to the below which would create a list of all directories on the X drive containing jpg files but what I really want is a list of all the folders where I forgot to add the jpg for instance, having to go through the list and comparing to the full folder list to look for differences is too time consuming and often leads to some being missed:
X:\>dir x:\*.jpg /w/o/s > \jpglist.txt
For example, using the above .jpg extension as an example imagine I had:
X:\2009pictures\holiday.jpg
X:\2010stuff\work.jpg
X:\2011work\reminder.txt
X:\2012pictures\holidaysnap.jpg
X:\2013\todo.doc
I'd like an output text file that says:
X:\2011work
X:\2013
Since these are the folders that do not contain any jpg files.
Really hope someone could help with this, would save me loads of time. I saw an old thread where someone was asking about a similarish type of subject ages ago and got some helpful replies so really hopeful a kind person on here can come to my rescue!
DOS - list files in folders without path