Jump to content
Sign in to follow this  

File Rename Help

Recommended Posts


I looked in the help file but i couldn't find anything that said how to rename file could some one help me out

Share this post

Link to post
Share on other sites

If you can jot that down on your todo list, you might indicate that MoveFile() is what we use here to rename a file too.

Maybe you can also use an object to do stuff with files like you would be familiar with if you have done vbscript. Like here:


Here's how I was gonna do this before I found this post. Here's my test thing. Just a test here, not a real script.

Func deleteme()
    $fso = ObjCreate('Scripting.FileSystemObject')
    $f = $fso.getfile("test.exe")
    $f.name = "deleteme.exe"
HotKeySet ('z', "deleteme")
while 1 

I compile it to .exe and the file that's running can rename itself. Of course it could not delete itself. But it can rename itself, then download a newer version and kill the gui and start the new version and when the new version starts it can check for 'deleteme.exe' and delete it.

You know . . . for autoupdates.

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