Another Sort file into Subfolder Question

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Another Sort file into Subfolder Question 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
Graf_Wetter
 
Posts: 45
Joined: Thu Aug 25, 2011 7:18 am

Search the help for "match patterns". That should do what you want.
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support

cron