Sign in to follow this  
Followers 0
idle

fileCopy fails if filename is the same

3 posts in this topic

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



Use FileMove() to rename files.

Share this post


Link to post
Share on other sites

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