@nofilenamequoting
@runonce:@set dirname={dlgstringS|Enter name of folder to move selection into|{file$|noext}}
Copy MOVE HERE FILE="{file$}" CREATEFOLDER="{$dirname}"
I need
user selects a file
show a dialogue with the file name without the extension (store this string $dirname)
@nofilenamequoting
@runonce:@set dirname={dlgstring|Enter name of folder to move into|{file$|noext}}
Select "{$dirname}*" DESELECTNOMATCH TYPE=files
Copy MOVE HERE CREATEFOLDER="{$dirname}"
If you want it to move directories which start with the pattern as well:
@nofilenamequoting
@runonce:@set dirname={dlgstring|Enter name of folder to move into|{file$|noext}}
Select "{$dirname}*" DESELECTNOMATCH
Select "{$dirname}" DESELECT
Copy MOVE HERE CREATEFOLDER="{$dirname}"
(I haven't tested the second one, but that should let you move files & directories without having to worry about errors moving the $dirname directory into itself if it already exists when you run the button.)
(Not sure if @runonce is still needed -- that may be fixed now -- but I've left it in anyway as it doesn't hurt.)
@nofilenamequoting
@runonce:@set dirname={dlgstring|Enter name of folder to move into|{file$|noext}}
Select "{$dirname}*" DESELECTNOMATCH TYPE=files
Copy MOVE HERE CREATEFOLDER="{$dirname}"[/quote]
This is brilliant.
Many thanks
[quote="leo"]
If you want it to move directories which start with the pattern as well:
@nofilenamequoting
@runonce:@set dirname={dlgstring|Enter name of folder to move into|{file$|noext}}
Select "{$dirname}*" DESELECTNOMATCH
Select "{$dirname}" DESELECT
Copy MOVE HERE CREATEFOLDER="{$dirname}"
(I haven't tested the second one, but that should let you move files & directories without having to worry about errors moving the $dirname directory into itself if it already exists when you run the button.)
(Not sure if @runonce is still needed -- that may be fixed now -- but I've left it in anyway as it doesn't hurt.)[/quote]
Today I don't need to move folders but who knows what code will be needed tomorrow? I'll add the code to the right mouse button action just in case.