Forums
Posted By: derekdwc finding files to create a list of them - 22nd Feb 2013 2:46pm
When using xp if I go to start then search if I type in .jpeg it comes up with all the jpegs or whatever file extension I put in.
What I'd like would be a program that would do the same but would enable me to make an excel list of them.
Got loads of mobi,jpeg,txt and pdf to sort out in various folders.
Been at it for a couple of days trying to sort

Could someone put the run-cmd lineon here in simple terms where to put the folder and file type if that works
Thanks
Posted By: Neilj Re: finding files to create a list of them - 22nd Feb 2013 5:37pm
Choose Start/Programs/Accessories/notepad to load a version of notepad

In notepad type in the following line of text......

dir c:\*.jp* /s > c:\users\yourwindowsname\desktop\output.txt

In the above replace "yourwindowsname" with whatever your windows login name is.
then click File / Save and save the file on your desktop however you MUST call the file so that
it has .bat at the end e.g. call it myprogram.bat - do not call it myprogram.txt otherwise it will not work.
It is important that the filename ends .bat so that it knows it is a batch program

You can run this 'batch program - c:\myprogram.bat' by double clicking on it in windows explorer

You should then see a file called output.txt appear on your desktop when it has finished showing all .jpg or .jpeg files

You can use same code and replace *.jp* with *.txt for text files *.xls* for excel files, *.doc* for word files etc. or *.* file all files. The /s means look in all sub directories.
Posted By: Rambo Re: finding files to create a list of them - 22nd Feb 2013 5:40pm
Try this free program to do it for you;

http://www.infonautics.ch/directorylistprint/

Posted By: Absinthian Re: finding files to create a list of them - 22nd Feb 2013 5:41pm
From the command prompt, use this:

DIR <StartDir> *.jpg,*.pdf,*.ext /b /s >files.csv

Where <StartDir> is the 'root' of where you want to start the search from (eg C:\ for start from C: drive root.

You can have more file types to search than those three, obviously! Just change/add what you want to search for.

The list of files will be written into the file 'files.csv'. This will be able to be opened directly in Excel.

There's plenty of other switches that DIR can use simply enter DIR /? to see them.
Posted By: Mark Re: finding files to create a list of them - 22nd Feb 2013 6:59pm
Derek if your stuck,I can help you Doing the above.
It's easy when you have been shown how.

Batch programs if not done correctly can do a lot of damage if you change the command. In this case DIR is the command.

If your on the wikiwalk on Sunday I can give you some pointers / help.
Posted By: derekdwc Re: finding files to create a list of them - 27th Feb 2013 5:43pm
Originally Posted by Rambo
Try this free program to do it for you;

http://www.infonautics.ch/directorylistprint/


THANKS
Bought the pro version. Does what I wanted
© Wirral-Wikiwirral