Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use vbs right to send sendto and create shortcuts to custom locations

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly introduces how to use vbs right to send sendto and create shortcuts to a custom location, with a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian with you to understand.

After adding a shortcut to a folder in the SendTo folder, right-click to send a copy of these files to this folder, which is actually a process of copying. Sometimes we just want to be a shortcut, so we have to find another way.

Save the following code as shortcut.vbs, then create a shortcut to the sendto directory (C:\ Documents and Settings\ username\ SendTo), change the name you want, such as "create a shortcut to my working directory", and support multiple files. You only need to change the strFolder in line 4 of the script to the value you need:

Set unNamedArguments = WScript.Arguments.UnNamed

Set WshShell = WScript.CreateObject ("WScript.Shell")

Set objFSO = CreateObject ("Scripting.FileSystemObject")

StrFolder = "d:\ temp\" 'should 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

Thank you for reading this article carefully. I hope the article "how to use the vbs right button to send sendto and create shortcuts to a custom location" shared by the editor will be helpful to you. At the same time, I hope you will support us and follow the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report