LaurentiuB 0 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 Share this post Link to post Share on other sites
JSThePatriot 18 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 LinksFile-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.ComputerGetInfo UDF's Updated! 11-23-2006External LinksVortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Share this post Link to post Share on other sites
LaurentiuB 0 Posted June 1, 2005 Yes, a part of the file is remane the same. ex: SameName_changedate.BAK Share this post Link to post Share on other sites
JSThePatriot 18 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 LinksFile-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.ComputerGetInfo UDF's Updated! 11-23-2006External LinksVortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Share this post Link to post Share on other sites
LaurentiuB 0 Posted June 1, 2005 yes, it's perfect ... thank you Share this post Link to post Share on other sites
JSThePatriot 18 Posted June 1, 2005 Not a problem. Glad I could be of service and use. JS AutoIt LinksFile-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.ComputerGetInfo UDF's Updated! 11-23-2006External LinksVortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Share this post Link to post Share on other sites