| View previous topic :: View next topic |
| Author |
Message |
icitos
Joined: 18 Jun 2009 Posts: 15
|
Posted: Fri Jan 14, 2011 11:38 am Post subject: FTP/SFTP chaining |
|
|
Need to know if the following scope is possible and which corresponding tasks are need to be chained
1. Monitor remote SFTP folder (no issue)
2. For any detected change, retrieve multiple files to a local folder (aaa_mmddyy.txt, bbb_mmdddyyy.txt, ccc_mmddyy.txt etc)
3. For each retrieved file, a corresponding trigger file will need to be created in the local folder. The contents showing the FTP status of either Success or Failure.
4. Each trigger file will have its format aaa_mmddyy.trg, bbb_mmddyy.trg, ccc_mmddyy.trg ...
Lastly, each of the retrieved files contains DB records, is there a way to parse the files and count the number of records contained in each file?
Please advise and thanks in advance for any help. |
|
| Back to top |
|
 |
Robert Site Admin
Joined: 25 May 2006 Posts: 1140
|
Posted: Mon Jan 17, 2011 11:11 am Post subject: |
|
|
which program are you using? JaSFtp or Automize enterprise?
1) _$%ppddyy%$.txt should download todays files matching the date format.
2) Use a Directory loop task. for each loop the filename found (aaa_mmddyy.txt), is saved as a variable.
3) Getthe FTP status of each file. You will have to check whether the filename exisits in the FailedFilenames variable. if it does, then failure.. if not success.. Use a variable monitor task and save the failure/success as another variable.
4) create a corresponding aaa_mmddyy.txt.trg using the FileVariable task write the failure/success variable as the first line..
5) You would have to use the CSV task (automize only) to parse and count lines etc.. |
|
| Back to top |
|
 |
icitos
Joined: 18 Jun 2009 Posts: 15
|
Posted: Tue Jan 18, 2011 6:25 am Post subject: Thanks |
|
|
| Will give this s try today and let you know. |
|
| Back to top |
|
 |
icitos
Joined: 18 Jun 2009 Posts: 15
|
Posted: Tue Jan 18, 2011 1:23 pm Post subject: |
|
|
Not sure about the directory loop task...could you enlighten me on this.
Once the FTP of multiple files are done. Do I need to run the directory loop on the local folder? |
|
| Back to top |
|
 |
melvin Site Admin
Joined: 25 May 2006 Posts: 595 Location: Santa Barbara, california
|
Posted: Wed Jan 19, 2011 9:36 am Post subject: |
|
|
| yes, once you download by Ftp to local folder, run a directory loop task against that local folder. |
|
| Back to top |
|
 |
|