Jump to content

FileMove for Renaming Purposes


Recommended Posts

Hello again,

I'm trying to use the FileMove function to rename a bunch of text files.

Some of the files have "_1" at the end of their name, for example, "File123_1.txt". I want to remove the "_1" so it would become "File123.txt".

What I currently have...

        FileMove($sSource & "\*_1.txt", $sDestination & "\*.txt")

But since I'm using a wildcard, it doesn't appear to be working. I think it's just replacing .txt with .txt. Am I going about this the wrong way? How can I use wildcards and still accomplish this?

Any help is greatly appreciated ^__^

Edited by XinYoung
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

  • Create New...