This button puts many new folder creation options in a single button.
If no folder is selected, the LMB creates a new folder in the folder display with the user entering the name. If a folder is selected, a new folder is created under the selected folder with the user entering the name.
The RMB creates a new folder from text in the clipboard.
Under the MMB for Options you can create a new folder and immediately edit the name, create a new folder that is the current date, or create a new folder for each selected file
Here is the button:
Create New Folders.dcf (5.2 KB)
Here is the code:
<?xml version="1.0"?>
<button 3dborders="no" backcol="none" display="label" dropdown_glyph_slim="yes" icon_size="large" label_pos="right" popout="right" textcol="#ff8000" type="three_button">
<label>Create New Folders</label>
<icon1>#makedir</icon1>
<button 3dborders="no" backcol="none" display="label" dropdown_glyph_slim="yes" icon_size="large" label_pos="right" popout="right" textcol="none">
<label>New Folder in the Source File Display or the Selected Folder</label>
<icon1>#makedir</icon1>
<function type="normal">
<instruction>@ifsel:numdirs=1</instruction>
<instruction>@nodeselect</instruction>
<instruction>@Set FolderName {dlgstringS|Create a New Subfolder within the Selected Folder\n\nPlease enter the new subfolder name.|New Subfolder}</instruction>
<instruction>CreateFolder "{filepath}{$FolderName}"</instruction>
<instruction>//Displays the parent folder with the new folder selected and unexpanded</instruction>
<instruction>Go EXPANDBRANCH</instruction>
<instruction>@ifsel:else</instruction>
<instruction>@disablenosel</instruction>
<instruction>@Set FolderName {dlgstringS|Create a New Folder in the Source File Display\n\nPlease enter the new folder name.|New Folder}</instruction>
<instruction>CreateFolder "{$FolderName}"</instruction>
<instruction>Go EXPANDBRANCH</instruction>
<instruction>//</instruction>
<instruction>//To edit new folder name</instruction>
<instruction>//CreateFolder INLINE</instruction>
<instruction>//</instruction>
<instruction>//Display Options</instruction>
<instruction>//Displays contents of new folder</instruction>
<instruction>//CreateFolder "{filepath}{$FolderName}"</instruction>
<instruction>//Go "{filepath}{$FolderName}"</instruction>
<instruction>//</instruction>
<instruction>//Displays {sourcepath} with parent of new folder selected</instruction>
<instruction>//CreateFolder "{filepath}{$FolderName}"</instruction>
<instruction>//CreateFolder NAME="{filepath}{$FolderName}"</instruction>
<instruction>//</instruction>
<instruction>//Displays new folder selected</instruction>
<instruction>//CreateFolder "{filepath}{$FolderName}"</instruction>
<instruction>//Go "{filepath}{$FolderName}"</instruction>
<instruction>//Go ".."</instruction>
<instruction>//</instruction>
<instruction>//Alternate Code - Slow</instruction>
<instruction>//Old Method takes longer to display {sourcepath} with parent of new folder selected</instruction>
<instruction>//FileType NEW=directory PATH={filepath} NEWNAME="{dlgstring|New Folder Name\n\nPlease enter the new subfolder name.|New Folder}"</instruction>
</function>
</button>
<button 3dborders="no" backcol="none" display="label" hotkey_label="yes" icon_size="large" label_pos="right" textcol="none">
<label>Clipboard</label>
<tip>In the File Display from the Clipboard</tip>
<icon1>#makedir</icon1>
<function type="normal">
<instruction>//CreateFolder FROMCLIPBOARD</instruction>
<instruction>//CreateFolder "{clip}"</instruction>
<instruction>CreateFolder FROMCLIPBOARD=multi </instruction>
</function>
</button>
<button 3dborders="no" backcol="none" display="label" icon_size="large" label_pos="right" textcol="none" type="menu">
<label>Options</label>
<icon1>#makedir</icon1>
<button backcol="none" display="label" field_type="label" size="full" textcol="none">
<label><b>Create a New Folder</b></label>
<icon1>#label</icon1>
<function type="normal">
<instruction>Set LABEL</instruction>
</function>
</button>
<button 3dborders="no" backcol="none" display="label" hotkey_label="yes" icon_size="large" label_pos="right" textcol="none">
<label>Edit the Name</label>
<icon1>#makedir</icon1>
<function type="normal">
<instruction>@Set FolderName {dlgstringS|New Folder Name\n\nPlease enter the new folder name.|New Folder}</instruction>
<instruction>CreateFolder "{$FolderName}"</instruction>
<instruction>CreateFolder INLINE</instruction>
</function>
</button>
<button 3dborders="no" backcol="none" display="label" icon_size="large" label_pos="right" textcol="none">
<label>The Name Is the Current Date</label>
<icon1>#makedir</icon1>
<function type="normal">
<instruction>CreateFolder NAME="{date|yyyy-MM-dd}"</instruction>
</function>
</button>
<button 3dborders="no" backcol="none" display="label" icon_size="large" label_pos="right" textcol="none">
<label>For Each Selected File</label>
<icon1>#makedir</icon1>
<function type="normal">
<instruction>//@nodeselect</instruction>
<instruction>//Clipboard COPYNAMES=nopaths REGEXP ^(.*)\.[^.]*$ \1</instruction>
<instruction>//CreateFolder FROMCLIPBOARD</instruction>
<instruction>//</instruction>
<instruction>//Copy HERE CREATEFOLDER= {file$|noext} MOVE</instruction>
<instruction>//</instruction>
<instruction>@disablenosel:files</instruction>
<instruction>CreateFolder NAME="{file|noext}"</instruction>
</function>
</button>
</button>
</button>