Hi, I'm about to change the folder and file structure on one of my company's fileservers. I have the new folder structure in place, but in order for me and the business to determine where to move the existing files and folder in the two or three top levels from the current structure I need to export this to an Excel sheet. I've tried using the Tree command, but the result wasn't what I needed.
How can I export a list of files located in a file folder to excel or to a text document? Preferably excel. Thank you, Tom.
I'd like for the toplevel folders to be in column A and the subfolders and files of these to be in column B and if necessary add more levels in the following columns. Does anyone have a VB script or anything that can help me with this? Thanks in advance, Ronnie.
Ever so simple in the end. Open the DOS command window from the Run menu.
Command to get back to root directory and then the cd command to get to the desired directory. Then: DIR /s >output.txt This will produce a directory listing including sub-directories (/s) and will create a file called output.txt in that directory. Will show directory levels against separate lines and the sub directories and files inder it so will take some tweaking in excel to get a sensible structure. Thanks Rob H. Hi, ronnie13. Instead of the Dir command, try Attrib.
Attrib Z: *.* /s >> File_Directory_List.txt. Assuming drive is Z. Opening the file in Excel launches the Text Import Wizard. Selected 'Delimited', click on 'Next'. Click on the 'Other' checkbox and enter a backslash in them box opposite. Click on 'Finish'. That's pretty much it, although you'll probably want to delete the first column.