1
Support and Feedback / Re: Rename window with filename only
« Last post by total_annihilation00 on Today at 11:12:11 »Yes — use `NEWNAME` as the suggested value, and generate that value with `PathGetNamePart(..., 1)`, which the docs say strips the extension. `MC.Filesystem.Rename` supports `ASKNAME`, and if `NEWNAME` is also provided, it is used as the suggested name in the rename dialog. `NEWNAME` must be only the file name, with no path parts.
Use this User-Defined Command MultiScript for only a popup /w the Filename (no Extension):
That will open the rename dialog with the current filename already filled in, but without the extension. `GetSourceFocusPath()` gives the current file, and `PathGetNamePart(path, 1)` returns the name without the extension. ([multicommander.com][2])
If you want the current file selection to be used automatically, you can even omit `FILE={$file}`, because the command uses the current file when `FILE` is not supplied.
Hope it helps ! In the future, you can use ChatGPT AI (ensure you click + and enable 'Thinking Mode') to help you /w your scripting needs, I found it very efficient, Claude is better at AutoHotkey scripting (unrelated.)
Use this User-Defined Command MultiScript for only a popup /w the Filename (no Extension):
Code: [Select]
#options (RunSeparate)
@var $file = GetSourceFocusPath();
@var $base = PathGetNamePart( $file, 1 );
MC.Filesystem.Rename FILE={$file} ASKNAME NEWNAME="{$base}";
That will open the rename dialog with the current filename already filled in, but without the extension. `GetSourceFocusPath()` gives the current file, and `PathGetNamePart(path, 1)` returns the name without the extension. ([multicommander.com][2])
If you want the current file selection to be used automatically, you can even omit `FILE={$file}`, because the command uses the current file when `FILE` is not supplied.
Hope it helps ! In the future, you can use ChatGPT AI (ensure you click + and enable 'Thinking Mode') to help you /w your scripting needs, I found it very efficient, Claude is better at AutoHotkey scripting (unrelated.)
Recent Posts