I'm wanting to set up a button to move files, based on their type, to different folders, eg all *.JPG files to a folder named Photos; and all *.MP4 files for a folder named Moves.
I'm using the following code, but it's a bit primitive. Can someone help me simplify it? Thank you so much!
CreateFolder NAME=Fotos READAUTO
CreateFolder NAME=Moves READAUTO
You only need the copy command for this. It can take wildcards and create destination folders.
There's almost never any need to use the Select command to change what another command will run on, nor to navigate to other folders to change which folders things run from or to.
Copy MOVE HERE CREATEFOLDER Photos
Copy MOVE HERE CREATEFOLDER Moves
No need to use Select here. Copy is all you need.
Thank you very much @Leo, now it's better!
Copy MOVE *.jpg HERE CREATEFOLDER Photos
Copy MOVE *.mp4 HERE CREATEFOLDER Moves
Copy MOVE *.(doc|docx) HERE CREATEFOLDER Word
Copy MOVE *.pdf HERE CREATEFOLDER PDF
Copy MOVE *.txt HERE CREATEFOLDER TXT