Jump to content

Recommended Posts

Posted (edited)

Hi, i will download a file with wget.

I will rename the file in my autoit script. I can´t! Please help! :(

Download the newest file

bla32*.exe

Rename the file

bla32.*date*.exe to bla32.exe

Run the file

bla32.exe

AutoIt Code

RunWait(@ComSpec & " /c " & 'wget.exe -P %snapshotpath% ftp://ftp......../bla32*.exe', "",)
Run(@ComSpec & " /c" & '%snapshotpath%bla32.exe',"", @SW_HIDE)

DOS Code

wget.exe ftp://ftp......../bla32*.exe
ren bla32*.exe bla32.exe
start bla32.exe

:hello:

Edited by Cryptor

Posted

From the AutoIt HELP file:

Because AutoIt lacks a "FileRename" function, use FileMove to rename a file!
Wildcards are supported, looks like you are in luck. Something like...
FileMove( @ScriptDir & "\bla32*.exe", @ScriptDir & "\bla32.exe")
...run from the same directory containing the file should do the trick.

Good luck.

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