Can someone confirm for me if there's an issue with the WHENEXISTS switches for the copy command?
I use a menu item to perform a simple backup of a file, copying it from one directory to another and automatically renaming the file arriving in the destination directory.
This appeared to work fine in DO8, but now DO9 appears to have introduced a new switch "WHENEXISTS=renameold", but both this and "WHENEXISTS=rename" seem to do the same thing: replace the existing file with the new file and rename the existing file.
As I said, I was used to the file being copied being renamed, not the existing file in the target directory being renamed.
Can anyone tell me if the same behaviour for both switches happens anywhere else?
Test Bed Setup[ol][li] Buttons:[ol]
[li] Copy WHENEXISTS=rename[/li]
[li] Copy WHENEXISTS=renameold[/li][/ol][/li]
[li] Left File Display Folder:[ul]
[li] File 1.txt - Date 2007-05-03 11:00:00 - Contents = "Left"[/li]
[li] File 2.txt - Date 2007-05-03 12:00:00 - Contents = "Left"[/li]
[li] File 3.txt - Date 2007-05-03 11:00:00 - Contents = "Left"[/li]
[li] File 4.txt - Date 2007-05-03 12:00:00 - Contents = "Left"[/li][/ul][/li]
[li] Right File Display Folder:[ul]
[li] File 1.txt - Date 2007-05-03 12:00:00 - Contents = "Right"[/li]
[li] File 2.txt - Date 2007-05-03 11:00:00 - Contents = "Right"[/li]
[li] File 3.txt - Date 2007-05-03 12:00:00 - Contents = "Right"[/li]
[li] File 4.txt - Date 2007-05-03 11:00:00 - Contents = "Right"[/li][/ul][/li][/ol]Test Script[ol][li] Open a Dual File Display Lister with the Left and Right Folder properly arranged.[/li]
[li] In the Left File Display, select File 1 and File 2.[/li]
[li] Click on Button 1 Copy WHENEXISTS=rename[/li]
[li] Turn on the Viewer Pane and inspect the file contents.
EXPECTED RESULTS: Since the files being copied exist in both the Left and Right File Displays, the Source files being copied should be renamed. The renamed Files should have these attributes:[ul][li] File 1 (Original).txt - Date 2007-05-03 11:00:00 - Contents = "Left"[/li]
[li] File 2 (Original).txt - Date 2007-05-03 12:00:00 - Contents = "Left"[/li][/ul] ACTUAL RESULTS: The Destination files are renamed—INCORRECT.
The renamed Files have these attributes:[ul][li] File 1 (Original).txt - Date 2007-05-03 12:00:00 - Contents = "Right"[/li]
[li] File 2 (Original).txt - Date 2007-05-03 11:00:00 - Contents = "Right"[/li][/ul][/li]
[li] In the Left File Display, select File 3 and File 4.[/li]
[li] Click on Button 2 Copy WHENEXISTS=renameold[/li]
[li] Turn on the Viewer Pane and inspect the file contents.
EXPECTED RESULTS: Since the files being copied exist in both the Left and Right File Displays, the existing Destination files should be renamed. The renamed Files should have these attributes:[ul][li] File 3 (Original).txt - Date 2007-05-03 12:00:00 - Contents = "Right"[/li]
[li] File 4 (Original).txt - Date 2007-05-03 11:00:00 - Contents = "Right"[/li][/ul] ACTUAL RESULTS: Same as Expected—CORRECT.[/li][/ol]
NOTE: If the same test script is run with Copy WHENEXISTS=ask, and the user manually selects Rename Old (all) or Rename New (All), the commands work correctly.
Opus 9.0.0.1 is out with a fix for this:[ul][li]...[/li]
[li]The Copy WHENEXISTING=rename command now works correctly (previously it did the same thing as 'renameold')[/li]
[li]...[/li][/ul]Full list of changes here: [Directory Opus 9.0.0.1)