Jump to content
Sign in to follow this  
idle

fileCopy fails if filename is the same

Recommended Posts

idle

Trying to execute small script to rename files from lowercase to uppercase.

The script finds the filename and converst it to uppercase just fine, but then fails to rename the file.

It works if I copy the files to a new dir, but when the files exists in that dir (in lowercase letters), it fails too.

$name = FileFindFirstFile("*.ted")

$newName = StringUpper($name)

MsgBox(0,"msg",$newName)

FileCopy($name, $newName, 1)

Share this post


Link to post
Share on other sites
Valik

Use FileMove() to rename files.

Share this post


Link to post
Share on other sites
idle

Use FileMove() to rename files.

Heeey, works. Thanx.

Skipped the filemove function as it is not able to overwrite files, but apparently it can if the filenames are different uppercase lowercase.

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.