Page 1 of 1

Move files to Folders with Names found in Files

PostPosted: Sat Feb 17, 2024 4:18 pm
by gcampbel99
I have many files in a folder that I want to quickly (and regularly) sort into a lot of folders. Each file has the name of the folder that I want the file to go to as the first part of the file till it reaches the character "-" (or dash). Below is the example of the files that I have:

Directory: AAA_AA
File 1: AAA_AA-12-31-2022.txt
File 2: BBB_BB-12-31-2022.txt

When finished, I should have 2 directories: AAA_AA and BBB_BB and the first file should be moved into AAA_AAA and the second file should be moved to BBB_BB.

Can you help?

Re: Move files to Folders with Names found in Files

PostPosted: Mon Feb 19, 2024 11:15 am
by Mr_Noodle
Look up match patterns and custom table attributes in the manual.

Re: Move files to Folders with Names found in Files

PostPosted: Wed Feb 21, 2024 4:19 pm
by kingshill
It's easy. As mentioned by the chief noodler, use "file name matches xyz". I use that since ages for sorting by date (identifying the date and move files by year only).