![]() |
I have to use the keyboard?! |
Updated 28/02/2012 to amend the syntax and remove instructions on making an xls file (Excel opens plain text files anyway)
Coming to the end of a project I realised I needed to create a table listing all of the files and folders within for that project.
This was a GIS (using ArcGIS) with many MXDs and associated data files, so the prospect of manually creating a list was a non-starter for me.
As with most discoveries laziness has been the driving factor in today’s “top tip”!
So I did a little research and with the helpful post located at HandyExcelTips.com found the perfect solution that has been around forever. To be honest I don’t know why I haven’t known about this as it seems quite a simple request…
These instructions have been tried on Windows Vista only but I’m pretty sure Windows XP and 7 (works on Windows 7) will work just as well. If not let me know in the comments section below! The usual disclaimers about don’t try this if you’re not sure apply.
Okay so here is how to do it (step 1 for a list with all the heading and summary info and step 2 to just have a list):
Step 1 Create a simple text or Excel file listing files and folder in a particular folder:
- Click start and in the start search text box type “cmd” and hit ‘enter’.
- Next type in the Command Prompt box to change your location to the desire folder you wanted to make a list from e.g.
cd d:\test\list
- Now to create a text file (which you can open in Excel) with the contents of the folder you have navigated to type this in:
dir > filelist.txt
Now you can use file explorer to open your file and folder list, with either Excel or Notepad!
Step 2 Create a simple text listing all sub-files and folders and without the header information or summary:
Following the first 2 steps above type this instead:
dir /s/b > filelist.txt
Not rocket science I know but I have found it very useful.