查找文件夹下的所有子文件 import os allfile=[] def dirlist(path): filelist=os.listdir(path) #fpath=os.getcwd() for filename in filelist: # allfile.append(fpath+'/'+filename) filepath=os.path.join(path,filename) if os.path.isdir(filepath): dirlist(filepath) else:
Function findAndCopy(srcFile As String, destFile As String, cmdFile As String) Dim WSH As Object, wExec As Object, result Dim val, n Dim i As Integer Dim sFile As Object, Fso As Object Dim cmdStr As String Set WSH = CreateObject("WScript.Shell")