hiteksoftware.com Forum Index hiteksoftware.com
User discussion forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

FTP/SFTP chaining

 
Post new topic   Reply to topic    hiteksoftware.com Forum Index -> FTP & SFTP
View previous topic :: View next topic  
Author Message
icitos



Joined: 18 Jun 2009
Posts: 15

PostPosted: Fri Jan 14, 2011 11:38 am    Post subject: FTP/SFTP chaining Reply with quote

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
View user's profile Send private message
Robert
Site Admin


Joined: 25 May 2006
Posts: 1140

PostPosted: Mon Jan 17, 2011 11:11 am    Post subject: Reply with quote

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
View user's profile Send private message
icitos



Joined: 18 Jun 2009
Posts: 15

PostPosted: Tue Jan 18, 2011 6:25 am    Post subject: Thanks Reply with quote

Will give this s try today and let you know.
Back to top
View user's profile Send private message
icitos



Joined: 18 Jun 2009
Posts: 15

PostPosted: Tue Jan 18, 2011 1:23 pm    Post subject: Reply with quote

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
View user's profile Send private message
melvin
Site Admin


Joined: 25 May 2006
Posts: 630
Location: Santa Barbara, california

PostPosted: Wed Jan 19, 2011 9:36 am    Post subject: Reply with quote

yes, once you download by Ftp to local folder, run a directory loop task against that local folder.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    hiteksoftware.com Forum Index -> FTP & SFTP All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group