Selectively removing the "Short Cut to" in file names

Discussion in 'other software & services' started by HandsOff, Feb 17, 2007.

Thread Status:
Not open for further replies.
  1. HandsOff

    HandsOff Registered Member

    Joined:
    Sep 16, 2003
    Posts:
    1,946
    Location:
    Bay Area, California
    I just wondered if there was an easy way to batch rename in windows explorer so it truncates the Shortcut to part of shortcut names.

    I don't want to do it to all shortcuts, so I cannot choose the global setting. It seems like a batch renaming problem, but I want to do it via explorer. I'm just wondering if it is possible with WE, or if there is a very simple renaming utility...


    -HandsOff
     
  2. Mrkvonic

    Mrkvonic Linux Systems Expert

    Joined:
    May 9, 2005
    Posts:
    8,702
    Hello,
    Would you like a script to work on a particular file?? Or a folder?
    Would that meet your needs?
    Mrk
     
  3. HandsOff

    HandsOff Registered Member

    Joined:
    Sep 16, 2003
    Posts:
    1,946
    Location:
    Bay Area, California
    Mr. K - Sorry, I missed your reply. A script that works on a specific folder might work. Call it "FolderX".

    I've written a script outside of applications that have their own customized scripting language. Years ago I did a fair amount of high level program language programming so I am familiar with that type of programming. I'm not sure how that compares with a script that would run in XP. If such a thing is easily doable it might open a whole world of possibilities. I am used to thinking in terms of

    -Editor of some kind: To write the source code
    -Compiler: To convert this to an executable
    -Running the executable

    Windows seems to blur steps and I've never really understood what people mean when they say scripts. Are you talking about a script that I would be able to read (like sourcecode). If so, then I should be able to use it for general purposes by substituting names.

    I'm going to assume the source code can be written by any text editor.
    What compiles it, and to what kind of file?
    How it the script executed?

    I hope I understood your suggestion!


    -HandsOff!
     
  4. Mrkvonic

    Mrkvonic Linux Systems Expert

    Joined:
    May 9, 2005
    Posts:
    8,702
    Hello,
    It can be written simply in BASIC - a batch file. Then loop through until all file names are changed. Or you might go fancy and write a tool in a programming language...
    Mrk
     
  5. HandsOff

    HandsOff Registered Member

    Joined:
    Sep 16, 2003
    Posts:
    1,946
    Location:
    Bay Area, California
    Hmmm, BASIC was the first language I learned, and at least when I used it it was not compiled as such. It used a line interpreter.

    come to think of it, it might not be that simple a program, at least to write it correctly, and I have no idea what the syntax and commands are for renaming file names.

    After thinking about it probably be easier to just do it one by one using the F2 hotkey for rename. It's just that I only know what I know about windows batch renaming from just trying it. Other systems, like XnView, actually describe all the ways you can rename. Hell, my MP3 tag editor lets you rename files by appending or truncating or following a rule.

    The one way I know of batch renaming in windows is to rename such that the name itself is the same with a number in parenthesis to differentiate them all.

    Highlight all of
    x.abc
    y.abc
    z.abc

    Then rightclick and name x.abc to x (1).abc and you get

    x (1).abc
    x (2).abc
    x (3).abc

    I just throw that out there in case someone may not know. Also, if there is something beyond this that can be done hopefully someone will say so.

    Thanks for your response, Mr. Kvonic. It is very interesting about using basic and scripts. I stopped programming largely because of the huge amount of time involved. I'm sure there are lots of interesting uses for scripts (I would like to see one) but I have been avoiding them like the plague!

    HandsOff
     
  6. Capp

    Capp Registered Member

    Joined:
    Oct 16, 2004
    Posts:
    2,125
    Location:
    United States
    If you now how to use WMI scripting (.vbs), then you can utilize the FileSystemObject reference and just do a loop to trim the "Shortcut to" part of each file name in a directory.
     
Loading...
Thread Status:
Not open for further replies.