After adding a folder shortcut to the SendTo folder, a copy of these files is sent to the folder, which is actually a copy process, sometimes we just want to be a shortcut, then we have to find another way.
Save the following code as Shortcut.vbs, and then create a shortcut to the SendTo directory (C:\Documents and settings\username\sendto) and change the name you want, such as "create a shortcut to my working directory", To create shortcuts, and to support multiple files, simply change the strfolder in the 4th line of the script to the value you want:
Copy Code code as follows:
Set unnamedarguments = WScript.Arguments.UnNamed
Set WshShell = WScript.CreateObject ("Wscript.Shell")
Set objFSO = CreateObject ("Scripting.FileSystemObject")
Strfolder = "D:\temp\" must be followed by a symbol "\"
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