July's Course of the Month is now available! Enroll to learn HTML5 and prepare for certification. It's free for Premium Members, Team Accounts, and Qualified Experts.
Set objFSO = CreateObject("Scripting.FileSystemObject") dim strdir strDir = "F:\Data" Set objDir = objFSO.GetFolder(strDir) getInfo(objDir) Sub getInfo(pCurrentDir) For Each aItem In pCurrentDir.Files 'wscript.Echo aItem.path Dim objShell Set objShell = WScript.CreateObject ("WScript.shell") objShell.run "cmd /k" & " " & spath Set objShell = Nothing Next For Each aItem In pCurrentDir.SubFolders ' wscript.Echo aItem.Name & " passing recursively" getInfo(aItem) Next End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.