Renaming Files in CMD

Soldato
Joined
30 Apr 2007
Posts
3,095
Location
Kent
Hi Guys,

At work we build up a variety of systems, and if the customer has not purchased a Microsoft Office licence from us, or does not have a pre-existing retail licence we will install OpenOffice for them. My colleagues have found that they get less problems if they rename the shortcuts to "OpenOffice Word", for example.

I am just wondering if there is a way to rename these shortcut files using CMD as renaming them manually on any build can become tedious.

Many Thanks
 
Shortcuts will have the .lnk extension and you use the 'rename' command in cmd. Use the "dir" command to list all the files in the current directory if you don't know the exact shortcut filename already.

E.g "rename myshortcut.lnk mynewshortcut.lnk"

If the names have spaces in them, use "s around the filename.

EDIT: if "rename" doesn't work use "REN".
 
Last edited:
Shortcuts will have the .lnk extension and you use the 'rename' command in cmd. Use the "dir" command to list all the files in the current directory if you don't know the exact shortcut filename already.

E.g "rename myshortcut.lnk mynewshortcut.lnk"

If the names have spaces in them, use "s around the filename.

EDIT: if "rename" doesn't work use "REN".

yeap, got it in one.
 
if they're on the desktop of their userprofile..

ren "%userprofile%\Desktop\shortcut to office word.lnk" "%userprofile%\Desktop\Word.lnk"
ren "%userprofile%\Desktop\shortcut to office excel.lnk" "%userprofile%\Desktop\Excel.lnk"


chuck that into notepad and save as renamer.bat or something
 
Back
Top Bottom