Created
March 22, 2013 17:48
-
-
Save narcotics726/5223299 to your computer and use it in GitHub Desktop.
Right click and "Send(ShortCut)To:DestPath" 发送快捷方式到:
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
Set unNamedArguments = WScript.Arguments.UnNamed | |
Set WshShell = WScript.CreateObject("WScript.Shell") | |
Set objFSO = CreateObject("Scripting.FileSystemObject") | |
strFolder="X:/Path" 'your dest path | |
for count=0 to wscript.arguments.count-1 Step 1 | |
filename = unNamedArguments.Item(count) | |
Set objFile = objFSO.GetFile(filename) | |
Set oShellLink = WshShell.CreateShortcut(strFolder&objFSO.GetBaseName(filename)&".lnk") | |
oShellLink.TargetPath=filename | |
oShellLink.WindowStyle=1 | |
oShellLink.WorkingDirectory=objFSO.GetParentFolderName(filename) | |
oShellLink.Save | |
NEXT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment