Created
February 22, 2012 18:07
-
-
Save jehoshua02/1886381 to your computer and use it in GitHub Desktop.
Launches everything in ./shortcuts/ folder
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# purpose: open all files in a directory as if each were double-clicked | |
# allowing the user to throw a bunch of program shortcuts into a | |
# directory and run this script to open them all. | |
# imports | |
import os | |
# declarations | |
shortcuts = os.getcwd() + '/shortcuts' | |
files = os.listdir(shortcuts) | |
# open each file in shortcuts | |
os.chdir(shortcuts) | |
for file in files: | |
try: | |
os.startfile(file, 'open') | |
except: | |
print "nope" | |
# open shortcuts for customizing | |
os.startfile(shortcuts) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment