Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: batch
I am new to "BATCH FILE" creation and i am stuck at one point.... I want to rename my software installed shortcut.After installation i have my shortcut at the Start menu shortcut say "abc1.0.lnk" to "abc1.1.lnk".... Also the I want to rename desktop shortcut from "abc1.0.lnk" to "abc1.1.lnk"....I googled but tried myself but not having success....
I checked my "C:\Document and Settings\username\abc.lnk" but the shortcut that looks in desktop is not seen in the specified link above...Is this the problem and also
I tried using
ren abc1.0.lnk abc1.1.lnk
also tried
ren "abc1.0.lnk" "abc1.1.lnk"
And
ren abc1.0 abc1.1
 
All this were giving me the Syntax command error....
 
Please suggest if u have any idea to rename the shortcut....
Posted 19-Jan-13 1:00am
Amol011693

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

On Windows 7, user folders within the start menu can be found at:
 
C:\Users\USER_NAME\AppData\Roaming\Microsoft\Windows\Start Menu
 

Read more: Where is the Start Menu Stored?

 
On Windows 7, Desktop Icons can be found at:
 
C:\Users\USER_NAME\Desktop
 

So if we change file name in those location then it will automatically reflect into start menu and desktop
and here is the BATCH code.
 
CD\
C:
CD Users
CD USER_NAME
CD AppData
CD Roaming
CD Microsoft
CD Windows
CD Start Menu
Cd Programs
Cd My Program
Rename ad.ink ad1.ink
CD\
C:
CD Users
CD USER_NAME
CD Desktop
Rename ad.ink ad1.ink
 

You have to replace "USER_NAME" with logged in Users name
 
Hope this helps if yes then accept the answer and vote it else revert back with your queries
--Rahul Dhoble
  Permalink  
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 295
1 DamithSL 265
2 CPallini 235
3 Maciej Los 190
4 George Jonsson 170
0 OriginalGriff 5,415
1 DamithSL 4,422
2 Maciej Los 3,820
3 Kornfeld Eliyahu Peter 3,470
4 Sergey Alexandrovich Kryukov 2,911


Advertise | Privacy | Mobile
Web02 | 2.8.141216.1 | Last Updated 19 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100