Page 1 of 1
Defining new default folder
Posted: 02 Nov 2019 13:19
by Peter28
Hi
I'd like to define my own new default folder (starting with "YY_MM_DD_").
Today (right mouse click\New\...) only the options "New Folder "YYYYMMDD" or "YYYY-MM-DD" are available. This doesn't work for me. I need "YY_MM_DD_".
How can I implement this option in the right mouseclick\New menu or EVEN better, with a shortcut?
Please advice.
Looking forward to hearing from you.
Kind regards,
Reto
Re: Defining new default folder
Posted: 03 Nov 2019 08:17
by bdeshi
paste the following code in the addressbar, then press ENTER. XYplorer will restart, and then you'll find the expected item in Right-click > New:
Code: Select all
setkey "YY_MM_DD_", "Folder3", "NewTemplates"; exit 'nr';
OR, if you want a shortcut, do the following.
- open main menu > User > Manage Commands.
- select "Run Script" from the category list at the left, then click the "New..." button at topright.
- Then at the bottom half of the window, fill up the textboxes like below:
- Caption:
New Folder ("YY_MM_DD_")
- Script:
new(now("YY_MM_DD_"), "dir",, "r");
- Now click the large "Assign Keyboard Shortcut..." button, set your desired keyboard shortcut.
- Check "On KeyUp" and OK out of the window.
[ed.]
Actually if you want to modify defaults, then you can use "Folder2" instead of "Folder3" in the setkey command above, then a shortcut can be assigned to the commandID directly from Tools > Customize Keyboard Shortcuts.
Re: Defining new default folder
Posted: 03 Nov 2019 09:31
by admin
SammaySarkar wrote: ↑03 Nov 2019 08:17
paste the following code in the addressbar, then press ENTER. XYplorer will restart, and then you'll find the expected item in Right-click > New:
Code: Select all
setkey "YY_MM_DD_", "Folder3", "NewTemplates"
Really? I think there is something missing in that code...
Re: Defining new default folder
Posted: 03 Nov 2019 13:13
by bdeshi
Where? I don't see anything missing...

Re: Defining new default folder
Posted: 03 Nov 2019 13:21
by admin
"XYplorer will restart." ?? Not with this script...

Re: Defining new default folder
Posted: 03 Nov 2019 13:23
by bdeshi
gah! that was embarrassing. (thanks!)

Re: Defining new default folder
Posted: 20 Feb 2020 11:34
by Peter28
Works! Big help. Many thanks!
Re: Defining new default folder
Posted: 20 Feb 2020 12:00
by Peter28
Hi,
I also want to shotcut create a folder with the name "99_OLD".
If I use your script however. The "99_OLD"-Folder cones out as a "99_OL20"-Folder.
Please advise,
Thanks
Re: Defining new default folder
Posted: 20 Feb 2020 14:22
by Peter28
How do I delete a no longer needed folder template ("Folder3)?
Re: Defining new default folder
Posted: 20 Feb 2020 17:57
by admin
Go down into the XYplorer.ini file using any editor and delete it there. Then restart XY without saving (File | Restart without Saving).
Re: Defining new default folder
Posted: 21 Feb 2020 10:53
by Peter28
Hi,
I also want to shotcut create a folder with the name "99_OLD".
If I use your script however. The "99_OLD"-Folder cones out as a "99_OL20"-Folder.
Please advise,
Thanks
Re: Defining new default folder
Posted: 22 Feb 2020 06:31
by jupe
You need to escape the string, so for example modify the template as such:
\9\9\_\O\L\D
Re: Defining new default folder
Posted: 27 Feb 2020 16:34
by admin
That's because a date pattern is expected by default, where e.g. an unescaped "D" stands for "day number".