Sign in to follow this  
Followers 0
wolf40

Using a variable with filemove to rename a file.

5 posts in this topic

Hello, I want to rename a file using filemove with a variable.

The variable changes daily.

The file will change from "foo.mp3" to "today.mp3" in the example.

I have searched the forum and tried different combinations but I can't get the right syntax.

$VAR = "today"

FileMove("C:\foo.mp3", "C:\" $VAR & '.mp3')

Share this post


Link to post
Share on other sites



Try this...

$VAR = "today"
FileMove("C:\foo.mp3", "C:\" & $VAR & ".mp3")

Share this post


Link to post
Share on other sites

Try this...

$VAR = "today"
FileMove("C:\foo.mp3", "C:\" & $VAR & ".mp3")
works perfect - thanks.

Share this post


Link to post
Share on other sites

works perfect - thanks.

you could also chek the help file...

Share this post


Link to post
Share on other sites

you could also chek the help file...

You could also refrain from making useless posts.

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