Jump to content

How Do I Rename a File..?


Recommended Posts

Not that easy but possible too:

If $CMDLine[0] > 1 and CMDLine[1] = "copy" and FileExists($CMDLine[2]) and @compiled = 1 Then
    Sleep(100)
    If $CMDLine[2] <> @autoitexe then FileDelete($CMDLine[2])
EndIf

FileMove(@scriptfullpath, $newdir)
Run('"' & $newdir & '" copy ' & @scriptfullpath)
Exit

senthor

Edited by senthor
Link to comment
Share on other sites

if you use a batch script to .exe app you can rename your script.exe while its running with this simple line:

REN %~0 TEST.EXE

and it works fine..

But with AutoIt you have to copy the script to a diff name, run the new script.exe which will delete the old script.exe..

Link to comment
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
 Share

  • Recently Browsing   0 members

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