As a simple example
Code: Select all
ON mouseUp pMouseBtnNo
answer file "Select the file to Duplicate"
IF it is not empty THEN
put it into SourceFile
put it into DestinationFile
set the itemdel to "/"
put "Copy Of" && last item of DestinationFile into last item of destinationFile
set the itemdel to comma
revCopyFile SourceFile,destinationFile
END IF
END mouseUp
sourceFile && "2"
The only thing that immediately comes to mind is copying the sourceFile to some temporary directory, then copying it, renamed, back to the original directory and finally deleting the temporary file, but that sure sounds ugly.
Does anyone have a suggestion for something cleaner?