Page 1 of 1 1
Topic Options
#210362 - 15/06/26 12:22 AM Rename Desktop Shortcut without Moving its Physical Location
Allen Moderator Offline
KiX Supporter
*****

Registered: 03/04/19
Posts: 4241
Loc: USA
I have been renaming some desktop shortcuts and have come across a problem when it renames the files, it does not put the file back in its original location on the desktop. In other words, lets say the file is located in the upper right hand corner of the desktop. Upon rename, the file is moved to the first location available starting from the left.

Anyone have any ideas on how I might preserve the physical location data?

Top
#210363 - 15/06/26 12:23 AM Re: Rename Desktop Shortcut without Moving its Physical Location [Re: Allen]
Allen Moderator Offline
KiX Supporter
*****

Registered: 03/04/19
Posts: 4241
Loc: USA
Oh I tried using the built in Move, and shelling with REN. Both work to rename the file, but both move the files from the physical location on the desktop.
Top
#210364 - 15/06/26 12:55 AM Re: Rename Desktop Shortcut without Moving its Physical Location [Re: Allen]
Allen Moderator Offline
KiX Supporter
*****

Registered: 03/04/19
Posts: 4241
Loc: USA
I found the following utility that will save the layout of the desktop, but once I rename the file it won't know where to put it... even has command line options... sigh...

DesktopOK -
http://www.softwareok.com/?Freeware/DesktopOK

Top
#210365 - 15/06/26 01:40 AM Re: Rename Desktop Shortcut without Moving its Physical Location [Re: Allen]
Glenn Barnas Moderator Offline
KiX Supporter
*****

Registered: 03/01/28
Posts: 4196
Loc: New Jersey
Gorilla Glue? \:D
_________________________

Actually I am a Rocket Scientist! \:D

Top
#210366 - 15/06/26 01:49 AM Re: Rename Desktop Shortcut without Moving its Physical Location [Re: Glenn Barnas]
Allen Moderator Offline
KiX Supporter
*****

Registered: 03/04/19
Posts: 4241
Loc: USA
I got plenty of that in the synapse of my brain. Never thought to apply it the desktop... Wow, just realized I can use White out on the screen too. Fixed!
Top
#210367 - 15/06/26 04:42 AM Re: Rename Desktop Shortcut without Moving its Physical Location [Re: Allen]
Glenn Barnas Moderator Offline
KiX Supporter
*****

Registered: 03/01/28
Posts: 4196
Loc: New Jersey
Wow - Glad I could help! \:D
_________________________

Actually I am a Rocket Scientist! \:D

Top
#210370 - 15/06/29 07:02 PM Re: Rename Desktop Shortcut without Moving its Physical Location [Re: Glenn Barnas]
Allen Moderator Offline
KiX Supporter
*****

Registered: 03/04/19
Posts: 4241
Loc: USA
Do I have everyone stumped? Surely we can overcome this design flaw.
Top
#210371 - 15/06/29 08:00 PM Re: Rename Desktop Shortcut without Moving its Physical Location [Re: Allen]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 01/06/05
Posts: 22294
Loc: Claremore, OK
Wonder if shell-object would do it different...
_________________________
!

download KiXnet

Top
#210372 - 15/06/29 11:28 PM Re: Rename Desktop Shortcut without Moving its Physical Location [Re: Lonkero]
Allen Moderator Offline
KiX Supporter
*****

Registered: 03/04/19
Posts: 4241
Loc: USA
Do you mean Shell.Application and use the Verbs? If so I looked into that, but didnt find any examples to use the Rename Verb. In the past when I have used the verbs you picked the one you wanted and used .doit method.
Top
#210373 - 15/06/30 02:00 AM Re: Rename Desktop Shortcut without Moving its Physical Location [Re: Allen]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 01/06/05
Posts: 22294
Loc: Claremore, OK
 Code:
 $shell=createobject("shell.application")
 $file=$Shell.namespace($file).self
 $file.name = "new name.lnk"


Maybe?
_________________________
!

download KiXnet

Top
#210374 - 15/06/30 02:47 AM Re: Rename Desktop Shortcut without Moving its Physical Location [Re: Lonkero]
Allen Moderator Offline
KiX Supporter
*****

Registered: 03/04/19
Posts: 4241
Loc: USA
hmmmm...
Top
#210375 - 15/06/30 04:18 AM Re: Rename Desktop Shortcut without Moving its Physical Location [Re: Allen]
Allen Moderator Offline
KiX Supporter
*****

Registered: 03/04/19
Posts: 4241
Loc: USA
Didn't work, but you got me in the right direction... more to come. Thanks man. \:\)
Top
#210379 - 15/06/30 11:33 PM Re: Rename Desktop Shortcut without Moving its Physical Location [Re: Allen]
Allen Moderator Offline
KiX Supporter
*****

Registered: 03/04/19
Posts: 4241
Loc: USA
This little basta took a lot of time to get working properly. I doubt anyone will ever use it besides me, but posted to the UDFS. Enjoy.

RenameDesktopItem() -
http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=210378#Post210378

Top
#210380 - 15/07/01 02:36 AM Re: Rename Desktop Shortcut without Moving its Physical Location [Re: Allen]
NTDOC Administrator Offline
Administrator
*****

Registered: 00/07/28
Posts: 11545
Loc: CA
Great, thanks for sharing Allen. One never knows. Might not need it today but no one knows what the future holds. Always good to have an arsenal of tools and ideas available.
Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Chris S., Glenn Barnas, ShaneEP, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 113 anonymous users online.
Newest Members
schnuggel, h315060, johnnyutah, pmk31, ArserHsieh
17412 Registered Users

Generated in 0.036 seconds in which 0.01 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org