renameitem function
Posted: 09 Dec 2010 12:34
I don't know how to use renameitem as a function. Could anyone show me some examples for it? Thank you very much.
Forum for XYplorer Users and Developers
https://www.xyplorer.com/xyfc/
::text renameitem("Copy of *");
Code: Select all
Examples:
// rename current file" to "John[.ext]" in current folder
::renameitem "John", , , "-00";
// rename "Paul.txt" to "John.txt" in current folder
::renameitem "John", "Paul.txt", , "-00";
// rename current file" to "<clipboard>[.ext]" in current folder
::renameitem <clipboard>;Simply add the parentheses (they are obligatory in functions):atjnjk wrote:That is what I don't understand. I expected renameitem to be used as a command. How can I rename files using it as a function?
Code: Select all
::renameitem("John", , , "-00");To make it/you feel better you can also do this:atjnjk wrote:Thank you very much. I've learned a new trick. Although it's a little unusual to use function like this.
Code: Select all
call renameitem("John", , , "-00");Yep, done.atjnjk wrote:A new trick again! It would be very helpful if these things are documented in the help file.