ok this one has me scratching my head as to is this even possible with excel / vba
been trying to create a file listing spreadsheet ( asked lots of questions here)
working version basically works but has some limitations and after feedback from others its been shared with
using the FSO (file system object) within VBA prevents reading of the route directory..
so as to the question
i can create a very simple cmd prompt routine that will read the directory and copy the file listing to a TXT file
this text file has predefined layout based on the cmd prompt instructions.
what i want to know and maybe get help to do is..
if i was to put up a message box to ask for a folder (or if possible put up the FSO file selection box) and use the return
then to write a small batch file with the cmd text to create the directory list from this folder as text file (either in the folder or a temp location)
to read this file into excel and strip out the required info into a new sheet with the directory name
i have attached the current working version of the workbook and a copy of the .bat batch file with the cmd code to create a filelisting.txt file (rename this file to "File Listing.bat" put this file in a folder and double click it it will run cmd prompt create file and close)
i am wanting to know if this would be possible to do within excel so that the user would see it as a seemless operation ..
for my own benefit the existing workbook does sub-directories ok and i could import the filelisting.txt manually
and i never presume to know what excel can and can't do since joining this forum i am surprised daily one what can be done
Thanks for reading and for any comments
in the code box below is the code for the batch file for those that dislike grabbing unknown files
Bookmarks