Jump to content

Recommended Posts

Posted

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

Posted

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)

Posted

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)

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...