Very new user. I'm trying to create a button that will make a copy of the selected item(s) and then add a date/time stamp to the item(s).
Here is the command:
Copy DUPLICATE WHENEXISTS=rename AS "{file|noext}_{date|yyyyMMdd}_{time|HHmm}{file|ext}"
Here is the button:
<?xml version="1.0"?>
<button backcol="none" display="both" hotkey="ctrl+shift+D" textcol="none">
<label>Copy + Timestamp File</label>
<tip>Makes a copy of the selected item(s) and adds a date/time stamp to the name.</tip>
<icon1>#duplicate</icon1>
<function type="normal">
<instruction>Copy DUPLICATE WHENEXISTS=rename AS "{file|noext}_{date|yyyyMMdd}_{time|HHmm}{file|ext}" </instruction>
</function>
</button>
This works fine for files but has issues when a directories are selected:
File:
fred.txt -> fred_20071016_1215.txt
Directory:
BamBam -> BamBam_20071016_1215BamBam
The control sequece {file|ext} returns the directory name for a directory...which causes my problem.
Is there anyway to have the copy command do different things for different types (like the rename command can do) or is there some other way to have files/directories processed differently within a buttion?
Thanks for your help,