Copy filename without extension to clipboard.

Ask for help and post your question on how to use XnView MP.

Moderators: XnTriq, xnview

trevzilla
Posts: 23
Joined: Wed Jun 29, 2016 10:32 pm

Copy filename without extension to clipboard.

Postby trevzilla » Wed May 24, 2017 3:27 pm

Is there a way to quickly and easily copy the filename without the extension to the clipboard? The two methods I've found are by hitting F2, then ctrl+c, then esc. Which successfully copies the filename without the extension but is 3 key presses.

The other I've found is by assigning "filename(s)" to a shortcut key in the settings menu. (r in my case). But this shortcut copies the extension as well, which means when I paste the filename in another program, I must hit the delete key 4 times to get rid of ".jpg"

Ideally I'm looking for a shortcut, like the "r" key, that will copy just the filename, and no extension.
Does this exist?

Thanks in advance!

cday
XnThusiast
Posts: 1512
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Copy filename without extension to clipboard.

Postby cday » Wed May 24, 2017 3:53 pm

It should be possible to do what you want using any one of a number of macro keystroke recorders...

You could look for example at AutoHotKey, a heavyweight general purpose scripting utility, or possibly at TinyTask among others.

Or, in the absence of other suggestions if our estimed archivist doesn't come up with a few suggestions, try Google a search...

bdragon
Posts: 93
Joined: Mon May 01, 2017 8:06 am

Re: Copy filename without extension to clipboard.

Postby bdragon » Wed May 24, 2017 3:58 pm

i agree. let's stick to the purpose of xnview and not make it do coffee too just because we like coffee

cday
XnThusiast
Posts: 1512
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Copy filename without extension to clipboard.

Postby cday » Wed May 24, 2017 4:37 pm

@trevzilla:

In my XnView MP 0.86, selecting a file in the browser selects just the filename without the extension, so that would be just two operations with Ctrl - C. I'm not sure if might be due to a different XnView MP setting, or possibly because my Windows 7 is set for 'single click to select' ??

But if you want a single action to copy the filename without the extension, a simple script should be the solution...

bdragon
Posts: 93
Joined: Mon May 01, 2017 8:06 am

Re: Copy filename without extension to clipboard.

Postby bdragon » Wed May 24, 2017 4:43 pm

Does your window show extensions at all? Because that is not enabled by default

cday
XnThusiast
Posts: 1512
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Copy filename without extension to clipboard.

Postby cday » Wed May 24, 2017 4:58 pm

bdragon wrote:Does your window show extensions at all? Because that is not enabled by default

In the XnView MP file browser, extensions are shown on my computer although they are currently off globally in Windows, but I have had extensions enabled recently, but they are still dispayed after closing and restarting XnView MP, although I wonder if the setting might have been saved when the program was closed?? I couldn't see how to simply refresh the browser display.

But in any case, a simple script should be the answer, as you said... :D

Edit:
cday wrote:I couldn't see how to simply refresh the browser display.

Found it now, couldn't see for looking, extensions remain visible after refreshing, and F2 still selects only the filename, not the extension.

trevzilla
Posts: 23
Joined: Wed Jun 29, 2016 10:32 pm

Re: Copy filename without extension to clipboard.

Postby trevzilla » Sun Jun 04, 2017 2:54 am

Thanks all for replying.

Actually, I already am using AutoHotKey, and have that script written. However, I just figured that since the rename dialog box doesn't automatically select the extension, that there might be an easier way already programmed that I didn't know about. I figured that I may be introducing extra programs when I didn't need to! But I guess I wasn't.

By no means am I suggesting this as a feature that needs to be included. :) Of course, I wouldn't complain if it was though!


Return to “MP - General Support”

Who is online

Users browsing this forum: No registered users and 1 guest