topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Sunday December 15, 2024, 4:26 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: DONE: Batch adjust shortcut targets  (Read 98109 times)

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,644
    • View Profile
    • Donate to Member
Re: DONE: Batch adjust shortcut targets
« Reply #50 on: October 01, 2014, 02:21 AM »
(see attachment in previous post)
Like you can see on the screenshot, I was able to change the path but not the name.
What I'm I doing wrong?

That's not likely to work since you haven't used valid Regular Expressions in the Target Path and Name input boxes.

I'll have a look later today if I've got time, I'm currently in the middle of a house renovation overseas.

@gendalf: Same thing, I'll have a look if I have time otherwise it's two weeks before I'm back home.

weberxw

  • Participant
  • Joined in 2014
  • *
  • default avatar
  • Posts: 7
    • View Profile
    • Donate to Member
Re: DONE: Batch adjust shortcut targets
« Reply #51 on: October 01, 2014, 08:11 AM »
That's not likely to work since you haven't used valid Regular Expressions in the Target Path and Name input boxes.
I'll have a look later today if I've got time.
hahah thats crazy..
Thank you man, I'll wait then.. Appreciate your help.

gendalf

  • Participant
  • Joined in 2014
  • *
  • default avatar
  • Posts: 3
    • View Profile
    • Donate to Member
Re: DONE: Batch adjust shortcut targets
« Reply #52 on: October 02, 2014, 03:18 AM »
a little suggestion: make it possible to paste target path in BSM, i don't like dropdown-select/tree menu it's just slowing down

weberxw

  • Participant
  • Joined in 2014
  • *
  • default avatar
  • Posts: 7
    • View Profile
    • Donate to Member
Re: DONE: Batch adjust shortcut targets
« Reply #53 on: October 07, 2014, 04:13 PM »
Nothing new?

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: DONE: Batch adjust shortcut targets
« Reply #54 on: October 07, 2014, 05:54 PM »
I'll have a look if I have time otherwise it's two weeks before I'm back home.

Nothing new?

@weberxw: 4wd mentioned he won't be back in-country for at least another week.  Please be patient.

weberxw

  • Participant
  • Joined in 2014
  • *
  • default avatar
  • Posts: 7
    • View Profile
    • Donate to Member
Re: DONE: Batch adjust shortcut targets
« Reply #55 on: October 07, 2014, 10:36 PM »
Ops, sorry... didn't read that before!  :Thmbsup:

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,644
    • View Profile
    • Donate to Member
Re: DONE: Batch adjust shortcut targets
« Reply #56 on: October 18, 2014, 07:05 AM »
BSM shows Error: Subscript used with non-Array variable. for me
i'm trying to change Disk letter of all of the shortcuts paths in the start menu.
i tried: G:\\(.*) -> D:\\\1 , G:(.*) -> D:\1 , $G(.*) -> D\1 , "G(.*) -> "D\1
all give me that error with or without test&recurse checkboxes


OK, found a problem due to some shortcuts in the Start menu not having a normal target, (ie. file or folder), an example is the "My Computer" shortcut.  A simple check for a valid file/folder target should fix that.

Oddly enough, v0.3 ran without a problem ... hmmm  :huh:

Currently you can paste a path in the folder selector that opens but I'll make the text field accept input too.

Yes, work in part.
I was able to change the path, this works fine.
But I couldn't change the name using the same search parameters..

For example:
I change the path from D:\RODOTECPAV\NF - Rod\09 2014\PDF\ to D:\RODOTECPAV\NF - Rod\10 2014\PDF\
Using the parameter 09 (old path) 10 (new path)... this works nice and prety simple

But I tried to change the name using the same parameters and nothing changes...
My shortuct names are like PDF 09.2014 Rodotec

Am I doing something wrong?
The parameters to change the name are diferent?

From the above it sounds like you expect BSM to change the name of the shortcut.

BSM does not change the name of the shortcut, if the shortcut is named PDF 09.2014 Rodotec then it will stay the same.

BSM changes the target that the shortcut points to - is that clear?

If you want to change the name of the shortcut then one of the many bulk renamer programs will do it easily.

Although I do have an idea which may or may not work.

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,644
    • View Profile
    • Donate to Member
Re: DONE: Batch adjust shortcut targets
« Reply #57 on: October 23, 2014, 06:54 AM »
BSM v0.6
  • Checks to see if the the Target of a shortcut is not null, (eg. various shortcuts in the Start Menu)
  • Can paste into the folder text field

It's here

gpsTao

  • Participant
  • Joined in 2013
  • *
  • default avatar
  • Posts: 3
    • View Profile
    • Donate to Member
Re: DONE: Batch adjust shortcut targets
« Reply #58 on: October 29, 2014, 07:23 AM »
I could not run. An error here:
http://i.imgur.com/yiSa0KF.png

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,644
    • View Profile
    • Donate to Member
Re: DONE: Batch adjust shortcut targets
« Reply #59 on: October 30, 2014, 12:38 AM »
Can you archive what shortcuts are in that folder and email them to f1796233(a)opayq.com please so I can test on my machine.


4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,644
    • View Profile
    • Donate to Member
Re: DONE: Batch adjust shortcut targets
« Reply #60 on: October 31, 2014, 11:40 PM »
Bug confirmed, I'll see what I've screwed up  :-\

Fixed that one but found another ... need a bigger swatter I think.
« Last Edit: November 01, 2014, 12:17 AM by 4wd »

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,644
    • View Profile
    • Donate to Member
Re: DONE: Batch adjust shortcut targets
« Reply #61 on: November 13, 2014, 05:29 AM »
I could not run. An error here:

Could you run the attached version and see what happens on the folder tree you sent me - I'm having trouble with the accented characters, (ã), don't know if it's my system or something else.
« Last Edit: November 14, 2014, 11:28 PM by 4wd »

gpsTao

  • Participant
  • Joined in 2013
  • *
  • default avatar
  • Posts: 3
    • View Profile
    • Donate to Member
Re: DONE: Batch adjust shortcut targets
« Reply #62 on: November 13, 2014, 05:59 AM »
Error:
http://i.imgur.com/jP73AdX.png

Another problem: If the selected folder has special characters, I get a warning saying that there is no shortcut.

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,644
    • View Profile
    • Donate to Member
Re: DONE: Batch adjust shortcut targets
« Reply #63 on: November 14, 2014, 11:54 PM »
OK, I'm going to rewrite the shortcut retrieval routine, there seems to be some problem with handing it to DOS even though the code page supposedly gets set correctly.

This will probably slow it down a bit.

nkormanik

  • Participant
  • Joined in 2010
  • *
  • Posts: 554
    • View Profile
    • Donate to Member
Re: DONE: Batch adjust shortcut targets
« Reply #64 on: November 15, 2014, 02:01 AM »
Slow but steady, 4wd.  Slow but steady.

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,644
    • View Profile
    • Donate to Member
Re: DONE: Batch adjust shortcut targets
« Reply #65 on: November 16, 2014, 11:09 PM »
Try this version, BSM 0.7

Now fully internal file list retrieval which, oddly enough, is faster than using DOS for small numbers of files but only about 25% slower for large numbers, (eg. 75 seconds as opposed to 60 seconds for 768780 shortcuts) ... so not too bad.

Seems to handle accented characters OK, @gpsTao - it handled all the shortcuts you sent me on my system fine.

Because it now uses purely AutoIt for file retrieval I might have a look at updating the statusbar with file numbers while it's searching and perhaps being able to cancel the search.
« Last Edit: November 23, 2014, 01:19 AM by 4wd »

gpsTao

  • Participant
  • Joined in 2013
  • *
  • default avatar
  • Posts: 3
    • View Profile
    • Donate to Member
Re: DONE: Batch adjust shortcut targets
« Reply #66 on: November 17, 2014, 05:29 AM »
Perfect!!

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,644
    • View Profile
    • Donate to Member
Re: DONE: Batch adjust shortcut targets
« Reply #67 on: November 23, 2014, 01:21 AM »
Moved BSM v0.7 from my above post to this one.

It'll stay as it is for a little while before I implement possible process interrupt and counting ... bit of other work to do first.

robertcollier4

  • Participant
  • Joined in 2019
  • *
  • default avatar
  • Posts: 1
    • View Profile
    • Donate to Member
Re: DONE: Batch adjust shortcut targets
« Reply #68 on: May 15, 2019, 05:25 AM »
I have made a AutoIt script for this: LNKSubstringReplacer
Will replace all substrings specified with your specified desired replacement substring in all Target and WorkingDir fields of LNKs specified in a directory you specify. Also has a simulated mode to show you the effects of your replacement in a text file so you can see what is found and what LNK target substring matches you have.

LNKSubstringReplacer Link LNK Path Substring Replacer
https://www.autoitscript.com/forum/topic/181812-lnksubstringreplacer-link-lnk-path-substring-replacer/

LNKSubstringReplacer_screenshot1.gifDONE: Batch adjust shortcut targets

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: DONE: Batch adjust shortcut targets
« Reply #69 on: May 15, 2019, 07:13 AM »
Thanks for sharing that, robert :up:

tenten

  • Participant
  • Joined in 2020
  • *
  • default avatar
  • Posts: 1
    • View Profile
    • Donate to Member
Re: DONE: Batch adjust shortcut targets
« Reply #70 on: July 20, 2020, 06:51 AM »
Thanks very much for this great tool! How can I use a part of the file name in the new path in BSM? For example, I have
d:\pictures\2019-07-03_001.jpg
and want to change that to
d:\pictures\2019\07\03_001.jpg

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,644
    • View Profile
    • Donate to Member
Re: DONE: Batch adjust shortcut targets
« Reply #71 on: July 20, 2020, 07:52 PM »
Thanks very much for this great tool!

Thanks, surprised anyone still uses it. ;D

How can I use a part of the file name in the new path in BSM?

You can't, filename and path are treated separately.

It's not apparent in your example whether the shortcut name is the same as the original filename, the new filename, or something different.  Can you clarify?

I've added the source code to my original post since I haven't touched AutoIt for years, (don't have it installed anymore - I prefer PowerShell these days since I don't have to install anything).
The version of AutoIt I was using, (3.3.8.0), is about 10 releases behind what is currently available so I'd expect either some functions are now incorporated into AutoIt or possibly break because something they rely on has changed.
« Last Edit: July 21, 2020, 02:01 AM by 4wd »