Select full file name when renaming on Windows

19

1

Does anyone know if it's possible to change a setting so that the full file name is selected when you rename a file in newer versions of Windows? (i.e. to match the behavior in Windows XP).

Currently it doesn't select the extension, so I have to do it manually.

John Sibly

Posted 2010-03-01T14:00:42.193

Reputation: 653

Yes, so was I... It was a welcome & long overdue feature, but you knew once is was implemented, that someone would be hankering for the 'good old days'... On the rare occasion where you change the extension, is it too much trouble to press CTRL-A (or use the mouse)? – CJM – 2010-03-01T14:18:05.830

@heavyd - I'm not sure it was necessary to convert the spelling of "behaviour" from UK English to US English. – ChrisF – 2010-03-01T14:27:46.860

7I actually rename extensions all the time at work (i.e. working with multiple copies of a file, .bak, .bakorig, .bakphase2, etc) so I can work with multiple file versions with automated processes and have the process pick up only the version I'm currently testing. – BBlake – 2010-03-01T14:36:27.997

3I'm a developer and basically spend a lot of my time renaming files-in particular changing the extension or copying the filename (by pressing F2 then Ctrl-C). I agree it is a good feature for most users, but in my case more of a hindrance. – John Sibly – 2010-03-01T14:37:07.153

@heavyd Yes the UK spelling of "behaviour" was intentional :) – John Sibly – 2010-03-01T14:37:51.303

1

I wanted to do the opposite, which is to rename files in WinXP like Win7, and the answers may be useful for you: http://superuser.com/questions/102104/renaming-files-using-f2-on-windows-xp

– Mehper C. Palavuzlar – 2010-03-01T14:44:18.683

How about pressing Ctrl-A after pressing F2? – 0fnt – 2010-03-02T19:27:04.257

Answers

10

Well, sure, if you're willing to go third-party.

#IfWinActive, ahk_class CabinetWClass
F2::Send {F2}^a
#IfWinActive

In the AutoHotKey scripting language. If you, for whatever reason, don't want to/can't install autohotkey, give me a shout in the comments and I'll compile a script containing that so it can run on it's own (and should not have any requirements such as .net)

Phoshi

Posted 2010-03-01T14:00:42.193

Reputation: 22 001

Thanks for the advice-this does the trick. I'm sure AutoHotKey could be useful solving a number of other issues as well! – John Sibly – 2010-03-02T14:53:53.037

1@John; Autohotkey is something I adore unreservedly. I'm fairly sure there's very little it can't do. – Phoshi – 2010-03-02T15:36:03.577

Yeah, change the second line to F2::Send {F2}{Home}^a to ensure the cursor is at the start of the filename. – roryhewitt – 2017-12-20T02:49:08.040

Just tried Autohotkey and this script on Windows 10 64-bit...and its totally awesome! Complete newbies should be directed to read the "Tutorial (quick start)". – AlainD – 2018-10-24T15:07:32.130

1Great fix! Interestingly, this selects the full filename, but leaves the cursor just before the extension itself. You could do "end" before "control+A" to get it to put the cursor at the end first. Not sure if I'll need that, but just glad to have this fix! – rocketmonkeys – 2013-06-20T14:06:33.233

2

Just type Ctrl + a — to select all text in the field — before typing a new file name.

This is practically no extra work at all since you are already going to have to type something.

Joseph Hansen

Posted 2010-03-01T14:00:42.193

Reputation: 3 578

Not working on files located on Desktop! [ Windows.7.Ultimate.x64.May.2016 ] – Dr.jacky – 2016-08-30T07:56:07.443

@Mr.Hyde make sure you're using the control button and that caps lock is off. Though I don't have Windows 7 so I'm not positive it will work on files on the Desktop, as you say, but the control + a keyboard combination has meant "select all" in almost every version of almost every major operating system for 20 years. – Joseph Hansen – 2016-08-30T23:22:51.850