Hi i have been trying to figure out how to get files from a sub directory but only if they are in a specific folder.
Perfect example is that i want to clean out .MAI files spam boxes, but not from other sub folders such as the inbox so to do that i need to create a file list but it seems i can use wild charaters for folders.
EG.
D:\MailServer is where i want to start searching. I have 2 sub folders
D:\MailServer\domain1.com
D:\MailServer\domain2.com
within each of these folders i have inbox, outbox, spam which all contain .MAI files
How do i delete only the .MAI files out of the spam directories.
I would presume the rule would be
D:\MailServer\*\spam\*.MAI but doesn't seem to take the * char as a wild card in the file search
Your help would be greatly appreciated.
Tim
Finding Files Question
-
- Posts: 15
- Joined: Wed May 24, 2006 9:06 pm
- Location: Australia
- Contact:
Finding Files Question
You should specify two masks in "Delete file" action
For example:
D:\MailServer\domain1.com\spam\*.mai
D:\MailServer\domain2.com\spam\*.mai
For example:
D:\MailServer\domain1.com\spam\*.mai
D:\MailServer\domain2.com\spam\*.mai
Finding Files Question
Also you may compose a little bit complex task with using "File loop" action
-
- Posts: 15
- Joined: Wed May 24, 2006 9:06 pm
- Location: Australia
- Contact:
Finding Files Question
Thanks Oleg,
Sorry i know i could specify each folder directly, but in this example you may have 50 domain folders and adding another mask every time could be along process and you would need to adjust the script everytime a domain comes and goes.
What could i do with the file loop?
thanks Tim
Sorry i know i could specify each folder directly, but in this example you may have 50 domain folders and adding another mask every time could be along process and you would need to adjust the script everytime a domain comes and goes.
What could i do with the file loop?
thanks Tim
-
- Posts: 15
- Joined: Wed May 24, 2006 9:06 pm
- Location: Australia
- Contact:
Finding Files Question
OK i have figured it out
FYI
I achieved it by
1. File search on base dir (eg. D:\MailServer\*.*)
- Folders only
- Enabled sub dirs
- Excluded the sub directories i didnt want (eg, inbox, sent ect)
This left me with the main domain directories and their Spam boxes directories.
2. Then i did a Text Loop action and loading in my external txt file with the domain list and stored the path as a variable.
3. Then i used the delete file action by joining the variable with \*.MAI which gives me the full file name so robotask can delete it.
Done! Problem solved.
Suggestion
I tell you what would be a good feature to have in RoboTask is a Include mask option which is just the reverse of the exclude and that would take care of unknown sub directory levels if you were after a specific sub directory with in it! Just like this senario.
I have only been using RoboTask for 1 week and so far the software is awesome. Well done.....
Why pay rip off prices for software like Auto Mate when this has just about everything it does but for 10% of the cost.
FYI
I achieved it by
1. File search on base dir (eg. D:\MailServer\*.*)
- Folders only
- Enabled sub dirs
- Excluded the sub directories i didnt want (eg, inbox, sent ect)
This left me with the main domain directories and their Spam boxes directories.
2. Then i did a Text Loop action and loading in my external txt file with the domain list and stored the path as a variable.
3. Then i used the delete file action by joining the variable with \*.MAI which gives me the full file name so robotask can delete it.
Done! Problem solved.
Suggestion
I tell you what would be a good feature to have in RoboTask is a Include mask option which is just the reverse of the exclude and that would take care of unknown sub directory levels if you were after a specific sub directory with in it! Just like this senario.
I have only been using RoboTask for 1 week and so far the software is awesome. Well done.....
Why pay rip off prices for software like Auto Mate when this has just about everything it does but for 10% of the cost.