LaurentiuB Posted June 1, 2005 Share Posted June 1, 2005 How can I copy a file from ftp if the file name is diferent from day to day ? How can I set the path where I want to copy the file and how can I print into log file the result of operation ? Thank you, Laurentiu Link to comment Share on other sites More sharing options...
JSThePatriot Posted June 1, 2005 Share Posted June 1, 2005 Does it change everyday in a way you can script something to be the pathname? Like everyday does it rename itself with current date? The only way you can use INetGet() is if you know the file name of the file you are trying to grab. As far as the log file you would have to also script that in as you go. Like if the INetGet() fails or completes properly have it log it into a file. JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
LaurentiuB Posted June 1, 2005 Author Share Posted June 1, 2005 Yes, a part of the file is remane the same. ex: SameName_changedate.BAK Link to comment Share on other sites More sharing options...
JSThePatriot Posted June 1, 2005 Share Posted June 1, 2005 Then yes you can script it to download the file. Something like the following (You would need to make sure the date format is correct.) ;Date format yyyymmdd $date = @Year & @Mon & @MDay ;File Name in described format of 'SameName_changedate.BAK' $fName = "SameName_" & $date & ".BAK" ;URL path to file. $URL = "ftp://www.somehost.com/somedirectory/" & $fName ;Get the file. INetGet($URL, "C:\SomeDIR\somefile.bak") If you need any more help please let me know. You can put the directory on your local computer in a variable as well if that will possibly give you more control. JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
LaurentiuB Posted June 1, 2005 Author Share Posted June 1, 2005 yes, it's perfect ... thank you Link to comment Share on other sites More sharing options...
JSThePatriot Posted June 1, 2005 Share Posted June 1, 2005 Not a problem. Glad I could be of service and use. JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now