Renaming a Folder

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
winstein
Pro Scripter
Posts: 84
Joined: Mon Nov 26, 2012 3:44 pm

Renaming a Folder

Post by winstein » Mon Aug 03, 2015 2:02 am

Two things:

1) In Macro Scheduler, there is a function called RenameFile, which is for, as it says, renaming a file. My question is, is there an equivalent function for renaming a folder? If yes, what's the function called?

2) When I copied a folder using CopyFolder, is there a way to rename the folder that is just copied into the target directory?
PPQ

User avatar
JRL
Automation Wizard
Posts: 3526
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: Renaming a Folder

Post by JRL » Mon Aug 03, 2015 12:55 pm

1) RenameFile> also renames folders.

2) CopyFolder> will rename as you copy
Copyfolder>Location\Name,NewLocation\NewName

Or if you prefer, copy the folder with CopyFolder> then at some later time in the script rename the folder using RenameFile>

Dominic_Fichera
Pro Scripter
Posts: 82
Joined: Mon Mar 24, 2014 12:15 pm

Re: Renaming a Folder

Post by Dominic_Fichera » Mon Aug 03, 2015 12:56 pm

Hey Winstein,

1) RenameFile also works on folders:

Code: Select all

RenameFile>C:\Users\%USER_NAME%\Desktop\test2,C:\Users\%USER_NAME%\Desktop\test3
2) CopyFile can rename files by changing the output to a new name:

Code: Select all

CopyFile>C:\Users\%USER_NAME%\Desktop\test2,C:\Users\%USER_NAME%\Desktop\test3
Hope this helps :)

Dominic

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts