->SetobjFSO=CreateObject("Scripting.FileSystemObject")
SetobjFile=objFSO.OpenTextFile("d:\1\0.txt",1)
setWshShell=WScript.CreateObject("WScript.Shell")
strFolder="d:\1"
DoUntilobjFile.AtEndOfStream
strLine=objFile.ReadLine
filename=strLine
SetobjFile=objFSO.GetFile(filename)
setoShellLink=WshShell.CreateShortcut(strFolder&objFSO.GetBaseName(filename)&".lnk")
oShellLink.TargetPath=objFile
oShellLink.WindowStyle=1
oShellLink.WorkingDirectory=objFSO.GetParentFolderName(filename)
oShellLink.Save
Loop
objFile.Close
这个只传递一次就完了
onerrorresumenext
DimkeyWord,DirTotal,TimeSpend,FileTotal,Fso,outFile,txtResult,txtPath,sPath
ConstMY_COMPUTER=&H11&
ConstWINDOW_HANDLE=0
ConstOPTIONS=0
SetobjShell=CreateObject("Shell.Application")
SetobjFolder=objShell.Namespace(My_Computer)
SetobjFolderItem=objFolder.Self
strPath=objFolderItem.Path
SetobjFolder=objShell.BrowseForFolder(WINDOW_HANDLE,"选择你要搜索的文件夹:",OPTIONS,strPath)
IfobjFolderIsNothingThen
msgbox"您没有选择任何有效目录!"
wscript.quit
else
SetobjFolderItem=objFolder.Self
sPath=objFolderItem.Path
txtpath=sPath
SetFso=wscript.CreateObject("scripting.filesystemobject")
FileTotal=0
DirTotal=0
'sPath=left(Wscript.ScriptFullName,len(Wscript.ScriptFullName)-len(Wscript.ScriptName))
'txtPath=trim(inputbox("你选的目录是"&sPath,"文件搜索",sPath))
keyWord=LCase(inputbox("请输入搜索关键字点Cancel的话会得到目录列表:","文件搜