ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

IDEA: port-apps launcher (auto-create shortcuts to exe's within a directory)

(1/4) > >>

suleika:
I run quite a lot of portable apps, although mostly from a folder on my hard drive.  I like to back them up onto usb drives and also copy them directly between my two laptops. 

I'd like a program that would create a folder full of nothing but shortcuts pointing to the various apps in my portable folder.  This way, if I move the apps around, create directories, rename things etc, I could easily auto-generate the shortcuts again.  The shortcut folder could then be added onto my desktop or as a taskbar toolbar in an instant.

Here's how I imagine it working (slightly inspired by the recent IconAnyFolder coding snack):  The shortcut creator would allow me to designate the top level directory, and then it would create shortcuts to any .exe file in that folder, and then search recursively one level down and add shortcuts to any .exe files it found there.  Any folders not including an .exe file would be searched further, and so on.

Well, that's what would work for me, since occasionally I have older versions and messy stuff like that stored within the folders of newer versions, and so I wouldn't want the shortcut creator to find them.  Also, many of the portable apps have executable plugins within their directories, which I wouldn't want shortcuts to.  But I imagine it could be configurable to either find all .exe's or to stop searching recursively at each found .exe as I suggest above.

Does anything like this exist already?  If not, any takers?

skrommel:
 :) Try ShortcutFolder!

Creates and collects shortcuts to programs in a folder named Shortcuts.

2008.2.11: Added depth limit, and only makes a shortcut to the first exe in every folder.
Skrommel


--- ---;ShortcutFolder.ahk
; Creates and collects shortcuts to programs in a folder
;Skrommel @ 2008

depth=2

#SingleInstance,Ignore
#NoEnv
SetBatchLines,-1

If 0=0
{
  FileSelectFolder,start,,3,Select a folder to search for programs
  If start=
  {
    MsgBox,0,TheDIZs,You didn't select a folder.
    ExitApp
  }
}   
Else
  start=%1%

StringSplit,startdepth,start,\

FileCreateDir,%A_WorkingDir%\Shortcuts

TrayTip,%ShortcutFolder%,Searching %start%...
Loop,%start%\*.exe,0,1
{
  olddir:=dir
  dir:=A_LoopFileDir
  StringSplit,dirdepth,dir,\
  If (dir<>olddir And dirdepth0-startdepth0<=depth)
  {
    SplitPath,A_LoopFileLongPath,name,dir,ext,name_no_ext,drive
    FileCreateShortcut,%A_LoopFileLongPath%,%A_WorkingDir%\Shortcuts\%name_no_ext%.lnk,,,,%A_LoopFileLongPath%,,1,
  }
}
TrayTip,%ShortcutFolder%,Shortcuts stored in %start%
Sleep,3000

skrommel:
 :) And I believe you can use my tool ShortCutter

Skrommel

suleika:
Thank you, Skrommel.   :)

ShortcutFolder successfully generated a load of shortcuts but unfortunately it's not really usable because there are shortcuts to over 150 Portable Gimp plug ins, various uninstall exe's, and some extra exe's with deceivingly similar names inside "App" folders.

If it's not possible to stop the search loop in any given path once an exe has been found (as per my description below) then could it be an option to select how many levels of subdirectory to search?  That would pretty much solve this for me.

By the way, I couldn't get Shortcutter to work.  I tried to insert or edit but clicking on "browse" gave me the message "Press OK to continue".

skrommel:
 :) Try the changed version of ShortcutFolder above!

Skrommel

Navigation

[0] Message Index

[#] Next page

Go to full version