renameitem function
-
atjnjk
- Posts: 32
- Joined: 04 Nov 2009 07:03
renameitem function
I don't know how to use renameitem as a function. Could anyone show me some examples for it? Thank you very much.
-
admin
- Site Admin
- Posts: 66351
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: renameitem function
For example, this renames a current file "hash.jpg" (or whatever is the current item) to "Copy of hash.jpg" and shows the new name "Copy of hash.jpg" in a text box:
::text renameitem("Copy of *");
FAQ | XY News RSS | XY X
-
zer0
- Posts: 2676
- Joined: 19 Jan 2009 20:11
Re: renameitem function
And some more from this entry in the changelog thread http://www.xyplorer.com/xyfc/viewtopic. ... 176#p55176
Note that "::" are for use in the address bar.
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>;Reporting a bug? Have a wish? Got a question? Use search - View roadmap - FAQs: Forum + XY site
Windows 7/10
Always using the latest stable two-decimal build
Windows 7/10
Always using the latest stable two-decimal build
-
atjnjk
- Posts: 32
- Joined: 04 Nov 2009 07:03
Re: renameitem function
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?
-
admin
- Site Admin
- Posts: 66351
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: renameitem function
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");FAQ | XY News RSS | XY X
-
atjnjk
- Posts: 32
- Joined: 04 Nov 2009 07:03
Re: renameitem function
Thank you very much. I've learned a new trick. Although it's a little unusual to use function like this.
-
admin
- Site Admin
- Posts: 66351
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: renameitem function
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");FAQ | XY News RSS | XY X
-
atjnjk
- Posts: 32
- Joined: 04 Nov 2009 07:03
Re: renameitem function
A new trick again! It would be very helpful if these things are documented in the help file.
-
admin
- Site Admin
- Posts: 66351
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: renameitem function
Yep, done.atjnjk wrote:A new trick again! It would be very helpful if these things are documented in the help file.
FAQ | XY News RSS | XY X
XYplorer Beta Club