Hi everyone. I've been working on a homebrewed file cataloging system for our design information and have some separate system ideas that I'd like to put all together in Excel.
Here's the grand goal: Make a catalog of all the files and folders, including subdirectories and their contents which has links to each file (folders not necessary) and can be sorted, populated with extra information for the files, and is generic enough to be a click-and-run type system.
Specifically, I'm using the dir DOS command to make the data file. Each line of the file is it's own data entry, so I don't have to worry about delimiters. I'd like to have an excel macro that will bring up the File->Open dialog window and let the user browse to and select the file they want to open.
I can easily use the macro recorder to do this for a specific file, but I can't figure out how to modify things to let it work for any data file the user cares to select. Alternately, I've found code that lets users select and open the data file they want, but it's a specific example with delimiters involved, and I can't figure out how to prune that code to be what I need.
Does anyone have suggestions? Also, could I get the macro to actually execute the .bat file I'm using to create the data file, and then open the file and pull out the data? EDIT: Could it all be rolled together so that the macro asks the user to browse to the directory to be cataloged, creates the correct DOS dir command batch file, executes that batch file, then imports the data? :EDIT
Thanks in advance to anyone who offers their opinions or advice!
-Adam Hartman
Mechanical Engineer
Zyvex Instruments, LLC
Richardson, TX
Bookmarks