chiners_68 Posted October 15, 2007 Posted October 15, 2007 Hi Guys, I want to run a script daily so it pulls down the latest sdat from Mcafee's ftp page. how can I do this?the page is ftp://ftp.mcafee.com/pub/antivirus/superdat/intel/ the sdat file name changes name each day so i need it to download SDAT*.exeNo login name or password is required for the ftp: page..ive tried this with my little knowledge of autoit but it dosent work.filecopy("ftp://ftp.mcafee.com/pub/antivirus/superdat/intel/sdat*.exe", "C:\Documents and Settings\name\Desktop")
chiners_68 Posted October 15, 2007 Author Posted October 15, 2007 (edited) ive created this now from looking at the function references.. InetGet("ftp://ftp.mcafee.com/pub/antivirus/superdat/intel/Sdat5140.exe", "C:\Documents and Settings\name\Desktop", 1, 1) While @InetGetActive TrayTip("Downloading", "Bytes = " & @InetGetBytesRead, 10, 16) Sleep(250) Wend MsgBox(0, "Bytes read", @InetGetBytesRead) it dosent seem to work & fulls over with a bytes read -1 Edited October 15, 2007 by chiners_68
DW1 Posted October 15, 2007 Posted October 15, 2007 (edited) InetGet("ftp://ftp.mcafee.com/pub/antivirus/superdat/intel/Sdat5140.exe", "C:\Documents and Settings\name\Desktop", 1, 1)You didn't specify a destination file, just a dirEDIT: Hmmm still not working for me Edited October 15, 2007 by danwilli AutoIt3 Online Help
DW1 Posted October 15, 2007 Posted October 15, 2007 This worksInetGet("ftp://ftp.mcafee.com/pub/antivirus/superdat/intel/Sdat5140.exe", @DesktopDir & "\test.exe", 1, 1) While @InetGetActive TrayTip("Downloading", "Bytes = " & @InetGetBytesRead, 10, 16) Sleep(250) Wend MsgBox(0, "Bytes read", @InetGetBytesRead) so I would check and see if "C:\Documents and Settings\name\Desktop" exists before trying to put a file there... Do you really have a user named "name"? AutoIt3 Online Help
chiners_68 Posted October 15, 2007 Author Posted October 15, 2007 (edited) danwilli, No, I dont have a user named 'name'. i just renamed that on the post as I didnt want to display the persons name. tried your scrit which you said works but still get the same bytes read -1.InetGet("ftp://ftp.mcafee.com/pub/antivirus/superdat/intel/Sdat5140.exe", @DesktopDir & "\test.exe", 1, 1)While @InetGetActive TrayTip("Downloading", "Bytes = " & @InetGetBytesRead, 10, 16) Sleep(250)WendMsgBox(0, "Bytes read", @InetGetBytesRead)Ive tried to the root of C:\ but that still dosent work. Edited October 15, 2007 by chiners_68
Nahuel Posted October 15, 2007 Posted October 15, 2007 danwilli, No, I dont have a user named 'name'. i just renamed that on the post as I didnt want to display the persons name. tried your scrit which you said works but still get the same bytes read -1.Ive tried to the root of C:\ but that still dosent work.@InetGetBytesRead = the number of bytes downloaded, or -1 if there has been an error.I suppose the error is that InetGet is no longer active. The script works for me.
chiners_68 Posted October 15, 2007 Author Posted October 15, 2007 Ive got it working on an open BB machine.. on my work network we have a mcafeee apliance which scans incoming files before it lets you download it. I guess this cachig & checking is taking too long for the InetGet & its timing out.
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