VBS 가 파일 이나 폴 더 경 로 를 옮 겨 다 니 며 파일 을 입력 하 는 모든 절대 경로(소스 코드)
1108 단어 VBS파일 옮 겨 다 니 기
Function listFilesPath(filepath)
t1=Timer()
Debug.WriteLine "**** , :"+CStr(t1)
Set fso=CreateObject("scripting.filesystemobject")
Set myfolder=fso.GetFolder(filepath)
If fso.FolderExists(filepath) then
Set subcol=myfolder.SubFolders
Set filescol=myfolder.Files
For Each file In filescol
Debug.WriteLine filepath+"\"+file.name
Next
If subcol.count>0 Then
For Each folder In subcol
'Debug.WriteLine filepath+"\"+folder.Name
listFilesPath(filepath+"\"+folder.Name)
next
End if
Else
Debug.WriteLine " "
End if
Set filescol=Nothing
Set subcol=nothing
Set fso=Nothing
t2=Timer()
Debug.WriteLine "**** , :"+CStr(t2)
Debug.WriteLine " :"&CStr(t2-t1)&" "
End function
전에 저희 가 비슷 한 글 을 업데이트 한 적 이 있 으 니 참고 하 셔 도 됩 니 다.