Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: using FOR /R and XXMKLINK to make shortcuts - syntax trouble  (Read 6514 times)

0 Members and 1 Guest are viewing this topic.

BrushYourTeeth

    Topic Starter


    Newbie

    using FOR /R and XXMKLINK to make shortcuts - syntax trouble
    « on: September 13, 2009, 12:19:20 AM »
    Hi, I'm trying to make a batch file to make .lnk shortcuts to all of my music collection.

    I'm getting close! I can get FOR /R to walk the directory tree, but XXMKLINK is behaving unexpectedly.

    for /r "\\mr-f36\music\" %f in (*.mp3) do xxmklink.exe "./" "%f"

    XXMKLINK is basically an updated version of shortcut.exe from the Win2k Dev Toolkit.

    Instead of making an appropriately named .lnk to each mp3, this just keeps overwriting mp3.lnk in the directory above me.  ???

    Salmon Trout

    • Guest
    Re: using FOR /R and XXMKLINK to make shortcuts - syntax trouble
    « Reply #1 on: September 13, 2009, 02:00:38 AM »
    Your command line passed to xxmklink seems a little short of arguments...

    Code: [Select]
    Command syntax of XXMKLINK:

        xxmklink spath opath [ arg [ wdir [ desc [ mode [ icon[:n] ]]]]]

        where
       
          spath     path of the shortcut (.lnk added as needed)
          opath     path of the object represented by the shortcut
          arg       argument string (use quotes with space, see below)
          wdir      path of the working directory (for "Start in")
          desc      description string (shown in Shosrtcut's Properties)
          mode      display mode (1:Normal [default], 3:Maximized, 7:Minimized)
          icon[:n]  icon file [with optional icon index value n]
     
          In addition to the above, the following switches are supported
          which can be placed in any position in the command line.

          /p        prompts before action
          /q        no output when successful (quiet)
          /e        checks error condition strictly

    Here is all of the information you need...

    http://www.xxcopy.com/xxcopy38.htm


    BrushYourTeeth

      Topic Starter


      Newbie

      Re: using FOR /R and XXMKLINK to make shortcuts - syntax trouble
      « Reply #2 on: September 13, 2009, 02:29:43 AM »
      Solved my own problem:

      for /r "\\mr-f36\music\" %f in (*) do xxmklink.exe "%~nf" "%f"

      Now I have a single directory full of .lnk shortcuts to my entire music collection.  :)