![]() |
![]() |
We are currently migrating this forum over to our HelpSystems domain. Please post all new threads in our new HelpSystems Community Portal. |
![]() |
|
![]() |
AutoMate Discussion | ![]() |
help :
faq :
home
|
||
Latest News:
|
latest topics : statistics |
Topic Title: Find files in a range of subfolders Topic Summary: Created On: 10/10/2016 06:52 PM Status: Read Only |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
||||||||||
On Monday of each week, I need to search all subfolders of a folder
C:\Timesheets\ for the end of the previous week. If there exists a subfolder with the date matching the end of the previous week, then attach the contained spreadsheet C:\Timesheets\Client 1\2016-10-08\Client1_2016-10-08_Timesheet.xls C:\Timesheets\Client 2\2016-10-08\Client2_2016-10-08_Timesheet.xls C:\Timesheets\Client 3\2016-10-01\Client3_2016-10-01_Timesheet.xls From this example, I would only need spreadsheets from Client 1 and Client 2.
|
||||||||||
|
||||||||||
![]() |
||||||||||
Not sure what you want to achieve, but from your example I would suggest that you look for files that start with the clientname and have the date you look for. So file names that include the string 'clientname_date'. This can be a relatively simple task.
------------------------- ![]() |
||||||||||
|
||||||||||
![]() |
||||||||||
There are multiple client subfolders.
There may or may not be a date subfolder within each client. I want to be able to search through all the client subfolders and see if there a matching date subfolder. If a matching date subfolder is found, I want to pick up the xls file within that date subfolder. From my example above, searching through the timesheets folder, the script would find a datesubfolder for client 1 and client 2.
|
||||||||||
|
||||||||||
![]() |
||||||||||
Hi Samuel,
You can use the Loop Files action, with the include subfolders option selected under advanced. You can then use an If Text contains statement on the filename or folder name to set your action. Attached is a sample of this.
Task Steps: (Right click, Select All, Copy to copy to the clipboard. Steps can then be pasted into the AutoMate Task Builder) ------------------------- ![]() Justin Aucoin | Support Analyst AutoMate | Division of HelpSystems HelpSystems, LLC | T: +1.213.738.1700 | F: +1.213.738.7665 |
||||||||||
|
||||||||||
![]() |
||||||||||
If you use the loop files action, you can also include the subfolders and you can select the correct files by using a filename mask. You can then either treat a file when found, or store the filenames in a data set and treat these later.
------------------------- ![]() |
||||||||||
|
||||||||||
![]() |
||||||||||
I was able to find the necessary files using the loop files in directory command.
I need to be able to attach the multiple files in an email.
|
||||||||||
|
||||||||||
![]() |
||||||||||
I decided to copy each found file to a temp directory. I was then able to include the folder as an attachment.
Thanks all for you help. If there's another recommendation, I'm open to suggestions.
|
||||||||||
|
||||||||||
![]() |
||||||||||
To attach the files to an email, you probably best use the dataset option (incl path name) to store the names of the files found in teh loop files action. The dataset is automatically created. fter you have finished the loop file action, you can use the loop dataset action to attach all files to your email.
------------------------- ![]() |
||||||||||
|
||||||||||
![]() |
||||||||||
I'm using the send email command. There are multiple rows that allow for multiple attachments, but i don't understand how i would use a dataset to attach multiple files.
Are you saying to interact with a new mail GUI?
|
||||||||||
|
AutoMate Discussion
» AUTOMATE » AutoMate 9
»
Find files in a range of subfolders
|
![]() |
FuseTalk Enterprise Edition v4.0 - © 1999-2021 FuseTalk Inc. All rights reserved.