jamesd1 Posted October 26, 2016 Report Share Posted October 26, 2016 I want to have a macro that looks at all the files in a directory and then creates a new directory for each file (where the name of the directory is based on the file's name) and then moves each file in the original directory into the newly created directory. So if E:\temp contains two files: filename1.mp4 and filename2.mp4 then the result would be two new directories containing one file each as in: e:\Video downloads\filename1\filename1.mp4 e:\Video downloads\filename2\filename2.mp4 The newly created folders should not include the mp4 extrension Quote Link to comment Share on other sites More sharing options...
rberq Posted October 26, 2016 Report Share Posted October 26, 2016 I think this will work: Repeat with Folder (folder E:\Temp, putting file name only into text variable T1) Use Variable Modify Text commands to copy T1 to T2 and strip off the file extension from T2 Create Folder: "C:\%T2%" Wait for Folder Exist: "C:\%T2%" Copy File or Files: "E:\Temp\%T1%" (destination C:\%T2%\%T1%)Repeat End 1 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.