acantor Posted August 23, 2017 Report Share Posted August 23, 2017 I want to generate a file that contains the names of every folder and every file in a particular folder. I am trying to avoid a clunky solution like this: Repeat the number of objects in the folder Press F2 // Rename the item, which causes the object to be selected Clipboard Copy Press Esc // Escape from rename Switch to an open file Clipboard Paste Switch to the list of folders and files Press Down Arrow // Navigate to the next item Repeat End I should be able to do this from the command line using this: dir > list.txt But I do not have administrative rights to access the folder from the command prompt. Looking forward to seeing your cool MEP ideas! Quote Link to comment Share on other sites More sharing options...
acantor Posted August 23, 2017 Author Report Share Posted August 23, 2017 I figured it out... and only three lines of code for the folder names, and three more lines for the file names. <REPEAT WITH FOLDER Path="C:\\Users\\Alan\\Documents\\Test" OnlyFiles="FALSE" Destination="%x%" FullPath="FALSE" ProcSubfolders="FALSE"/> <TEXT TYPE Action="0" Text="%x%<ENTER>"/> <END REPEAT/> Repeat with Folder C:\Users\Alan\Documents\Test Text Type (Simulate Keystrokes): %x%<ENTER> End Repeat Another example of the versatility of Macro Express Pro! Quote Link to comment Share on other sites More sharing options...
Cory Posted September 19, 2017 Report Share Posted September 19, 2017 Correct. Here again you need to use MEP's file manipulation commands and stay away form Window File Explorer. 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.