Error renaming folder

hey guys,

I'm getting this error when running my project (v5.) -

Rename [ E:\\P4\\ProAudio\\dev_CMProjOGL_FM ] to [ dev_CMProjOGL_FM-Old ]

Information

Messages

Rename failed

 

Why, when renaming, there are 2 backslashes "\\" , while what I'm trying to do is renaming - %P4PATH%\ProAudio\%BranchName% ?

Anyway, why did it fail? There is no problem changing the folder's name manually.

Thanks.

Hi guy,

The %P4PATH% environment variable probably has a trailing backslash and an accidental double-blackslash in the value, ie the value of the variable is E:\P4. You can verify this by adding a Watch for P4PATH on the Watches tab in FB (click the Add Watch button), and then running the project again.

One of the wacky things about most Windows system functions is that they will ignore double backslashes in path names, most of the time. So that’s probably why this hasn’t been a problem in the past.

Hopefully, changing the environment variable will fix the problem. Please let us know if it doesn’t.

Regards,

Angus

Hi Angus.

Thanks for your answer.

 We double checked this double-slash variable in the Watch. we even wrote it into a file and it's ALWAY as expected.

Still, sometimes is fails, even when the variable which was printed into a file is ok.

It seems that the Rename action double the slashes on some occasions.

Am I the only one who encounter this problem?

Here is another example of a successful assignment and renaming

( Directory "E:\P4\ProAudio\rel_01_08" renamed to "rel_01_08-Old" )

Thanks again,

Guy.

Hi guy,

I can't explain this offhand. The Rename action is using the same technique to expand variables in the file name as the other actions. It even verifies that the file exists before it attempts to rename.

Does the "Rename failed" line in the action log output include any other error information? Going from the source in FB 5, the error output should be more like "Rename failed: [Error Message] "? Are you using a current version of FB 5?

Regards,

Angus