Jump to content

Using a variable with filemove to rename a file.


Recommended Posts

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')

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...