FileRename() Method

Hi, 

 

I am attempting to write a script/protocol which accesses files on a shared drive and renames them.  For this I believe, we can use the FileRename() method. 

 

However, it doesn't appear to be renaming the files as expected - it just doesn't do anything.

In the code above, for each file, I am generating its new name and then passing it as an argument to the fileRename() method.

 

 

 

 

 

However, I notice no change in file name after running the code above.

Do you need to have the file read in to be allow File Renaming?

 

Any help will be highly appreciated!

 

Thanks,

Kashish