Select full file name when renaming on Windows

7,383

Solution 1

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)

Solution 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.

Share:
7,383

Related videos on Youtube

John Sibly
Author by

John Sibly

Updated on September 17, 2022

Comments

  • John Sibly
    John Sibly almost 2 years

    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.

    • CJM
      CJM over 14 years
      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)?
    • ChrisF
      ChrisF over 14 years
      @heavyd - I'm not sure it was necessary to convert the spelling of "behaviour" from UK English to US English.
    • Jackson
      Jackson over 14 years
      I 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.
    • John Sibly
      John Sibly over 14 years
      I'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
      John Sibly over 14 years
      @heavyd Yes the UK spelling of "behaviour" was intentional :)
    • Greg Jennings
      Greg Jennings over 14 years
      I wanted to do the opposite, which is to rename files in WinXP like Win7, and the answers may be useful for you: superuser.com/questions/102104/…
    • 0fnt
      0fnt over 14 years
      How about pressing Ctrl-A after pressing F2?
  • John Sibly
    John Sibly over 14 years
    Thanks for the advice-this does the trick. I'm sure AutoHotKey could be useful solving a number of other issues as well!
  • UNK
    UNK over 14 years
    @John; Autohotkey is something I adore unreservedly. I'm fairly sure there's very little it can't do.
  • rocketmonkeys
    rocketmonkeys about 11 years
    Great 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!
  • Dr.jacky
    Dr.jacky almost 8 years
    Not working on files located on Desktop! [ Windows.7.Ultimate.x64.May.2016 ]
  • Joe Hansen
    Joe Hansen almost 8 years
    @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.
  • roryhewitt
    roryhewitt over 6 years
    Yeah, change the second line to F2::Send {F2}{Home}^a to ensure the cursor is at the start of the filename.
  • AlainD
    AlainD over 5 years
    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)".