Sign in to follow this  
Followers 0
Necromorph

Change a file name

3 posts in this topic

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



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  
Followers 0