Jump to content
Sign in to follow this  
chiners_68

Ftp:// download from script

Recommended Posts

chiners_68

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*.exe

No 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")

Share this post


Link to post
Share on other sites
chiners_68

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 by chiners_68

Share this post


Link to post
Share on other sites
DW1

This works

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)
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"?

Share this post


Link to post
Share on other sites
chiners_68

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)

Wend

MsgBox(0, "Bytes read", @InetGetBytesRead)

Ive tried to the root of C:\ but that still dosent work.

Edited by chiners_68

Share this post


Link to post
Share on other sites
weaponx

Fails for me too. The link works in Firefox.

Share this post


Link to post
Share on other sites
Nahuel

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.

Share this post


Link to post
Share on other sites
chiners_68

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.

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.