你是VBS脚本高手,你就请进!!!
来源:百度知道 编辑:UC知道 时间:2024/06/02 06:16:40
谢谢帮忙 !!!
下面的供您参考:
由于最近下了很多歌曲,但是“我的音乐“所在磁盘空间紧张,所以想到将音乐移到别的磁盘,而在“我的音乐“文件夹只保留指向这些音乐的快捷方式,因此写了这个脚本。
'**************************************************************
'*NAME: <CreateMyShortCut.vbs>
'*AUTHOR: SoakTech
'*DATE: 22/02/2005
'**************************************************************
Const WINDOW_HANDLE = 0
Const NO_OPTIONS = 0
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.BrowseForFolder _
(WINDOW_HANDLE, "选择快捷方式要发送的文件夹:", NO_OPTIONS)
If Not objFolder is Nothing then
Set objFolderItem = objFolder.Self
objPath = objFolderItem.Path
strDestinatio
'**************************************************************
'*NAME: <CreateMyShortCut.vbs>
'*AUTHOR: SoakTech
'*DATE: 22/02/2005
'---------------
'*Modify by MyPrettyLife@z.baidu.com 7/08/2009
'**************************************************************
Set objArgs = WScript.Arguments
Set WshShell = WScript.CreateObject("WScript.Shell")
strDestination = WshShell.SpecialFolders("SendTo")
For i = 0 to objArgs.Count - 1
strShortCut = strDestination & "\" & GetMyFileName(objArgs(i)) & ".lnk"
set objShellLink = WshShell.CreateShortcut(strShortCut)
objShellLink.TargetPath = objArgs(i)
objShellLink.WindowStyle = 1
objShellLink.WorkingDirectory = Left(objArgs(i), InStrRev(objArgs(i), "\"))
objShellLink.Save
Ne