Hi
I am new to XYplorer so please excuse my ignorance if this is a thing. But I have searched an can not find anything on it
I have used another manager Salamander for years but it has not been in development for a long time and I am starting to have issues with it. So I looked for a replacement and found XYplorer which is awesome.
There is one thing in Salamander I liked. That was a history of Folder names when creating or renaming folders. you could up or down arrow when creating a folder or renaming and cycle through the last 10-20 folder names you had used.
I found this convenient when you were duplicating file structures and saved you having to retype the folder name
Is there such a thing in XYplorer?
Could you let me know
Thanks for any assistance
Alan
Folder creation or Rename History
-
admin
- Site Admin
- Posts: 66075
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Folder creation or Rename History
Hi and welcome to the club!
You mean you could press up/down right in the inline rename box (F2) and cycle through recently used folder names? Sounds nice, but it's not currently available in XYplorer.
Without an interface hint, I think most users will never find this function. Is it popular among Salamander users?
You mean you could press up/down right in the inline rename box (F2) and cycle through recently used folder names? Sounds nice, but it's not currently available in XYplorer.
Without an interface hint, I think most users will never find this function. Is it popular among Salamander users?
FAQ | XY News RSS | XY X
-
highend
- Posts: 14923
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Folder creation or Rename History
Can be easily done via scripting...
Create user defined commands, assign keyboard shortcuts to them and use the appropriate script
These two variables should be set to the same values in both scripts!
Do not set the
This will create a new folder in the current path
This will rename the currently selected file / folder
Create user defined commands, assign keyboard shortcuts to them and use the appropriate script
These two variables should be set to the same values in both scripts!
Code: Select all
$maxEntries = 30;
$historyFile = "<xydata>\History\folders.txt";
$maxEntries variable too high, the drop-down for the selection should fit on the screen...This will create a new folder in the current path
Code: Select all
// Create folder (with history)
$maxEntries = 30;
$historyFile = "<xydata>\History\folders.txt";
$defaultName = "New Folder";
if (!exists($historyFile)) { new($historyFile, "file"); }
$historyItems = readfile($historyFile, "t_BLU8", 3:=65001);
$folderName = input("Enter folder name", 2:=$defaultName, 7:=$historyItems);
$escaped = regexreplace($folderName, "([\\^$.+()\[{])", "\$1");
$historyItems = regexreplace($historyItems, "^" . $escaped . "(\r?\n|$)");
$historyItems = $folderName . <crlf> . $historyItems;
$historyItems = gettoken($historyItems, $maxEntries, <crlf>, , 1);
writefile($historyFile, $historyItems, , "utf8");
new($folderName, "dir");
Code: Select all
// Rename file/folder (folders with history)
$maxEntries = 30;
$historyFile = "<xydata>\History\folders.txt";
if (!exists($historyFile)) { new($historyFile, "file"); }
$historyItems = readfile($historyFile, "t_BLU8", 3:=65001);
$itemPath = <curitem>;
$itemName = <curname>;
if (exists($itemPath) == 1) {
$newItemName = input("Enter new file name", 2:=$itemName);
if ($newItemName != $itemName) { renameitem($newItemName, $itemPath); }
} else {
$newItemName = input("Enter new folder name", 2:=$itemName, 7:=$historyItems);
if ($newItemName != $itemName) {
$escaped = regexreplace($newItemName, "([\\^$.+()\[{])", "\$1");
$historyItems = regexreplace($historyItems, "^" . $escaped . "(\r?\n|$)");
$historyItems = $newItemName . <crlf> . $historyItems;
$historyItems = gettoken($historyItems, $maxEntries, <crlf>, , 1);
writefile($historyFile, $historyItems, , "utf8");
renameitem($newItemName, $itemPath);
}
}
One of my scripts helped you out? Please donate via Paypal
-
salteran
- Posts: 5
- Joined: 03 Jan 2026 00:22
Re: Folder creation or Rename History
Thank you kindly. Yes that is exactly it. Or if you were doing a new folder F7. This was great if you are doing multiple folders of the same kind ie Cover Art, MP3, FLAC, Featurettes etc. Just hit F7, up arrow until you have the one you want or click on on the arrow to the right and select from the list or if you had a folder to rename just F2admin wrote: ↑03 Jan 2026 10:19 Hi and welcome to the club!
You mean you could press up/down right in the inline rename box (F2) and cycle through recently used folder names? Sounds nice, but it's not currently available in XYplorer.
Without an interface hint, I think most users will never find this function. Is it popular among Salamander users?
I have used it for years. Never really had any contact with other Salamander users but the feture was always there!!!
Alan
-
admin
- Site Admin
- Posts: 66075
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Folder creation or Rename History
I see. I'll consider it.
Note that you can emulate it to some degree using the Batch Rename dialog. To rename a single item, select it and press Shift+F2. Whatever you enter there will be found in the dropdown list the next time you open the dialog.
Note that you can emulate it to some degree using the Batch Rename dialog. To rename a single item, select it and press Shift+F2. Whatever you enter there will be found in the dropdown list the next time you open the dialog.
FAQ | XY News RSS | XY X
-
salteran
- Posts: 5
- Joined: 03 Jan 2026 00:22
Re: Folder creation or Rename History
Thank you HighEnd!!!highend wrote: ↑03 Jan 2026 11:08 Can be easily done via scripting...
Create user defined commands, assign keyboard shortcuts to them and use the appropriate script
These two variables should be set to the same values in both scripts!Do not set theCode: Select all
$maxEntries = 30; $historyFile = "<xydata>\History\folders.txt";$maxEntriesvariable too high, the drop-down for the selection should fit on the screen...
This will create a new folder in the current pathThis will rename the currently selected file / folderCode: Select all
// Create folder (with history) $maxEntries = 30; $historyFile = "<xydata>\History\folders.txt"; $defaultName = "New Folder"; if (!exists($historyFile)) { new($historyFile, "file"); } $historyItems = readfile($historyFile, "t_BLU8", 3:=65001); $folderName = input("Enter folder name", 2:=$defaultName, 7:=$historyItems); $escaped = regexreplace($folderName, "([\\^$.+()\[{])", "\$1"); $historyItems = regexreplace($historyItems, "^" . $escaped . "(\r?\n|$)"); $historyItems = $folderName . <crlf> . $historyItems; $historyItems = gettoken($historyItems, $maxEntries, <crlf>, , 1); writefile($historyFile, $historyItems, , "utf8"); new($folderName, "dir");Code: Select all
// Rename file/folder (folders with history) $maxEntries = 30; $historyFile = "<xydata>\History\folders.txt"; if (!exists($historyFile)) { new($historyFile, "file"); } $historyItems = readfile($historyFile, "t_BLU8", 3:=65001); $itemPath = <curitem>; $itemName = <curname>; if (exists($itemPath) == 1) { $newItemName = input("Enter new file name", 2:=$itemName); if ($newItemName != $itemName) { renameitem($newItemName, $itemPath); } } else { $newItemName = input("Enter new folder name", 2:=$itemName, 7:=$historyItems); if ($newItemName != $itemName) { $escaped = regexreplace($newItemName, "([\\^$.+()\[{])", "\$1"); $historyItems = regexreplace($historyItems, "^" . $escaped . "(\r?\n|$)"); $historyItems = $newItemName . <crlf> . $historyItems; $historyItems = gettoken($historyItems, $maxEntries, <crlf>, , 1); writefile($historyFile, $historyItems, , "utf8"); renameitem($newItemName, $itemPath); } }
These are pretty much what I want.
I had an error with the new folder script initially saying it was empty, but I continued the script and entered a folder name, and now that there is an entry in the history its fine
Also you get a nasty looking error if you try to rename to a folder that already exists, This does not happen with the new folder creation it appends -01 onto the name
Is there away to reassign Hard shortcuts. I would love to make the F2 be mapped to the rename script
At the moment I have assigned New Folder to N and Rename Folder to R and the CTRL + N to the New Folder script
A Big thank you for the assist. I am so Happy!!!!
Thanks
Alan
-
salteran
- Posts: 5
- Joined: 03 Jan 2026 00:22
Re: Folder creation or Rename History
Yes I tried that it does work for Batch Rename - Thank you for your help!!!!
-
highend
- Posts: 14923
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Folder creation or Rename History
I don't see any sort of errors here...I had an error with the new folder script initially saying it was empty, but I continued the script and entered a folder name, and now that there is an entry in the history its fine
Not hereAlso you get a nasty looking error if you try to rename to a folder that already exists, This does not happen with the new folder creation it appends -01 onto the name
If I create "New folder" with the script and afterwards again (via the script) with the same name then the new created folder gets the -01 suffix automatically...
Remove the original shortcut in Menu - Tools - Customize Keyboard Shortcuts...
and then you can use it for the user defined command
One of my scripts helped you out? Please donate via Paypal
-
salteran
- Posts: 5
- Joined: 03 Jan 2026 00:22
Re: Folder creation or Rename History
Brilliant - Thank you!!!highend wrote: ↑03 Jan 2026 12:27I don't see any sort of errors here...I had an error with the new folder script initially saying it was empty, but I continued the script and entered a folder name, and now that there is an entry in the history its fine
Not hereAlso you get a nasty looking error if you try to rename to a folder that already exists, This does not happen with the new folder creation it appends -01 onto the name
If I create "New folder" with the script and afterwards again (via the script) with the same name then the new created folder gets the -01 suffix automatically...
Remove the original shortcut in Menu - Tools - Customize Keyboard Shortcuts...
and then you can use it for the user defined command
XYplorer Beta Club