Copy File(s) single file rename problem

I have the source and destination parameters set as the following. According to the help file: "When copying a single file (not using wildcards), then you can use the Destination field to rename the file at the same time as copying it to another location."

However, what I get as a result in the backup folder is a new subdirectory named "nxServer_SecureStdXtsAes.exe", inside which I find the nxServer.exe file.

So, the file does not get renamed while copying; I get a new (unexpected) directory instead. I do have the "Force directories" checkbox checked; is this an unintended interplay between the options?

Source: %NXB_OutputDir%EXE\nxServer.exe

Destination: %BackupDirectory%\nxServer_SecureStdXtsAes.exe

Hi

You need to disable the ‘Destination is a directory’ option for the rename operation to work correctly. Otherwise you are telling the action to create a subdirectory (with the new name intended for the file) as the destination. Disable this option and the action will rename the file correctly.

Hope this helps.

Regards,
Steve

Even though the issue can be worked around with this, I’d say the result is not consistent.

Reason: I did have “Destination is a directory” turned on originally, but both the source and destination contained the same file name (nxServer.exe). However, that did not cause any extra directory creation. I guess that is a bug (at least I can’t find that exception in the help file).

Hi

In the case where the destination directory contains a file with the same name as the file you are copying, then you can use the Existing Files options to select how existing files will be handled.

If you enable the ‘Destination is a directory’ and ‘Force Directories’ options and no directory with this name exists, it will be created. This is the intended behaviour of this action. The destination will always treated as a directory when the ‘Destination is a directory’ option is enabled.

Regards,
Steve

Dear,

You may use this tools to solve this problem.

 

http://longpathtool.com/

with regards

Technext