Amerifax-Bob Posted May 2, 2013 Report Share Posted May 2, 2013 I have a folder on my hard drive that contains hundreds of JPG images. I would like to list them all in a text document. 'm trying to find a way to capture the name of every file and enter the name into a text document. After all of the files are entered into the document my goal is to import the text document into Access. I was trying to accomplish this with the use of an Access program. I tried several different forms and no one could come up with a solution. Then I started thinking about Macro Expression. Am thinking that it should be able to do that I just don't know the direction to start with. Bob Quote Link to comment Share on other sites More sharing options...
Cory Posted May 2, 2013 Report Share Posted May 2, 2013 Use the Repeat with Folder command and write each name to a file using the Variable Modify with the option to append a CR LF (end of line). I suggest you also check the attributes of the file and skip those that are hidden. If it's a Windows machine there will be a hidden thumbnail Db file in the folder. If there are a lot of files and it runs slow I would assemble all the names into a variable and write that at once when the loop is complete. If your ultimate goal is an Access Db I would write a VBA routine to do this directly in your Db. If this is beyond your skill set you could hire me to write it for you. Quote Link to comment Share on other sites More sharing options...
Samrae Posted May 2, 2013 Report Share Posted May 2, 2013 Using Macro Express Pro: Repeat with Folder E:\temp Variable Modify String: Append %A_File% to text file, "E:\temp\files.txt" End Repeat If you only need to do this once you can do this manually: Win+R (to bring up the run dialog) cmd In the command prompt type something like this (follow each line with <ENTER>): C: cd \photos dir *.jpg >files.txt To close command prompt exit Quote Link to comment Share on other sites More sharing options...
Amerifax-Bob Posted May 3, 2013 Author Report Share Posted May 3, 2013 Cory I sent you a link. You should have it. Bob Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.