Page 1 of 1

Another Sort file into Subfolder Question

PostPosted: Thu Aug 25, 2011 7:36 am
by Graf_Wetter
Hi.

I have a folder were different kinds of files are copied in, all named with a specific 5-characters-prefix (=Order-No. that changes with each new order)

Example:

10001_xxx.txt
10001_yyy.txt
10002_abc.txt
10002_xyz.txt
10002_zzz.txt
10003_zuh.txt


In want Hazel to look for the prefixes and sort the matching files into subfolders only named with the prefix:

Example:

10001 (Folder)
-10001_xxx.txt
-10001_yyy.txt

10002 (Folder)
-10002_abc.txt
-10002_xyz.txt
-10002_zzz.txt

10003 (Folder)
-10003_zuh.txt

Tried it with "sort file into subfolder", put can“t modify the name pattern for reading only the first five characters ...

Any other solution ?
RegEx ?

Greetings from Germany ...

Graf_Wetter

Re: Another Sort file into Subfolder Question

PostPosted: Thu Aug 25, 2011 3:11 pm
by Mr_Noodle
Search the help for "match patterns". That should do what you want.