Defining new default folder
-
Peter28
- Posts: 9
- Joined: 14 Jun 2018 09:57
Defining new default folder
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
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
-
bdeshi
- Posts: 4256
- Joined: 12 Mar 2014 17:27
- Location: Asteroid B-612
- Contact:
Re: Defining new default folder
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:
OR, if you want a shortcut, do the following.
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.
Code: Select all
setkey "YY_MM_DD_", "Folder3", "NewTemplates"; exit 'nr';- 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");
- Caption:
- Now click the large "Assign Keyboard Shortcut..." button, set your desired keyboard shortcut.
- Check "On KeyUp" and OK out of the window.
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.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
admin
- Site Admin
- Posts: 66366
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Defining new default folder
Really? I think there is something missing in that code...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"
FAQ | XY News RSS | XY X
-
bdeshi
- Posts: 4256
- Joined: 12 Mar 2014 17:27
- Location: Asteroid B-612
- Contact:
Re: Defining new default folder
Where? I don't see anything missing... 

Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
admin
- Site Admin
- Posts: 66366
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Defining new default folder
"XYplorer will restart." ?? Not with this script...
FAQ | XY News RSS | XY X
-
bdeshi
- Posts: 4256
- Joined: 12 Mar 2014 17:27
- Location: Asteroid B-612
- Contact:
Re: Defining new default folder
gah! that was embarrassing. (thanks!) 
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
Peter28
- Posts: 9
- Joined: 14 Jun 2018 09:57
Re: Defining new default folder
Works! Big help. Many thanks!
-
Peter28
- Posts: 9
- Joined: 14 Jun 2018 09:57
Re: Defining new default folder
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
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
-
Peter28
- Posts: 9
- Joined: 14 Jun 2018 09:57
Re: Defining new default folder
How do I delete a no longer needed folder template ("Folder3)?
-
admin
- Site Admin
- Posts: 66366
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Defining new default folder
Go down into the XYplorer.ini file using any editor and delete it there. Then restart XY without saving (File | Restart without Saving).
FAQ | XY News RSS | XY X
-
Peter28
- Posts: 9
- Joined: 14 Jun 2018 09:57
Re: Defining new default folder
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
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
-
jupe
- Posts: 3462
- Joined: 20 Oct 2017 21:14
- Location: Win10 22H2 120dpi
Re: Defining new default folder
You need to escape the string, so for example modify the template as such:
\9\9\_\O\L\D
\9\9\_\O\L\D
-
admin
- Site Admin
- Posts: 66366
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Defining new default folder
That's because a date pattern is expected by default, where e.g. an unescaped "D" stands for "day number".
FAQ | XY News RSS | XY X
XYplorer Beta Club