I\'m a newbie, so bear with me...
I am trying to copy all .doc
files that I have scattered throughout several subdirectories of one main directory into
you can also use vbscript
Set objFS = CreateObject("Scripting.FileSystemObject")
strFolder = "c:\test"
strDestination = "c:\tmp\"
Set objFolder = objFS.GetFolder(strFolder)
Go(objFolder)
Sub Go(objDIR)
If objDIR <> "\System Volume Information" Then
For Each eFolder in objDIR.SubFolders
Go eFolder
Next
For Each strFile In objDIR.Files
strFileName = strFile.Name
strExtension = objFS.GetExtensionName(strFile)
If strExtension = "doc" Then
objFS.CopyFile strFile , strDestination & strFileName
End If
Next
End If
End Sub
save as mycopy.vbs and on command line
c:\test> cscript /nologo mycopy.vbs