Jump to content
Sign in to follow this  
Necromorph

Change a file name

Recommended Posts

Necromorph

i was wondering if there was a built in function to change a file name, i have been doing it but it seems redundant how i do it like this:

$hFileRead = FileRead($hFile)
$hFileOpen = FileOpen($hNewFile, 1)
FileWrite($hFileOpen, $hFileRead)
FileClose($hFileOpen)
FileDelete($hFile)

im just hoping for like:

FileChangeName($sOldFileName, $sNewFileName)

it seems like there would be a better way to do then to create a new file, copy the contents of the old file, then close the new file, then delete the old file.

thanks for any input.

Share this post


Link to post
Share on other sites
Necromorph

i did look, sorry i missed that, very sorry. thanks though.

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.