Page 1 of 1 1
Topic Options
#210362 - 2015-06-26 12:22 AM Rename Desktop Shortcut without Moving its Physical Location
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4545
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 - 2015-06-26 12:23 AM Re: Rename Desktop Shortcut without Moving its Physical Location [Re: Allen]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4545
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 - 2015-06-26 12:55 AM Re: Rename Desktop Shortcut without Moving its Physical Location [Re: Allen]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4545
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 - 2015-06-26 01:40 AM Re: Rename Desktop Shortcut without Moving its Physical Location [Re: Allen]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4396
Loc: New Jersey
Gorilla Glue? \:D
_________________________
Actually I am a Rocket Scientist! \:D

Top
#210366 - 2015-06-26 01:49 AM Re: Rename Desktop Shortcut without Moving its Physical Location [Re: Glenn Barnas]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4545
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 - 2015-06-26 04:42 AM Re: Rename Desktop Shortcut without Moving its Physical Location [Re: Allen]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4396
Loc: New Jersey
Wow - Glad I could help! \:D
_________________________
Actually I am a Rocket Scientist! \:D

Top
#210370 - 2015-06-29 07:02 PM Re: Rename Desktop Shortcut without Moving its Physical Location [Re: Glenn Barnas]
Allen Administrator Online   shocked
KiX Supporter
*****

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

Registered: 2001-06-05
Posts: 22346
Loc: OK
Wonder if shell-object would do it different...
_________________________
!

download KiXnet

Top
#210372 - 2015-06-29 11:28 PM Re: Rename Desktop Shortcut without Moving its Physical Location [Re: Lonkero]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4545
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 - 2015-06-30 02:00 AM Re: Rename Desktop Shortcut without Moving its Physical Location [Re: Allen]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
 Code:
 $shell=createobject("shell.application")
 $file=$Shell.namespace($file).self
 $file.name = "new name.lnk"


Maybe?
_________________________
!

download KiXnet

Top
#210374 - 2015-06-30 02:47 AM Re: Rename Desktop Shortcut without Moving its Physical Location [Re: Lonkero]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4545
Loc: USA
hmmmm...
Top
#210375 - 2015-06-30 04:18 AM Re: Rename Desktop Shortcut without Moving its Physical Location [Re: Allen]
Allen Administrator Online   shocked
KiX Supporter
*****

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

Registered: 2003-04-19
Posts: 4545
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 - 2015-07-01 02:36 AM Re: Rename Desktop Shortcut without Moving its Physical Location [Re: Allen]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
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, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
2 registered (morganw, mole) and 414 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.134 seconds in which 0.105 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