Grabber
20 pts. | Aug 12 2009 3:00PM GMT
That would be correct if it also gave me an error in Windows 2003 but it doesn’t .
Here is the script
Set objFS = CreateObject(”Scripting.FileSystemObject”)
strFolder = “c:Transcriptsdocfiles”
strDestination = “c:docs”
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 = <a href="http://strFile.Name" title="http://strFile. " target="_blank">strFile.Name</a>
strExtension = objFS.GetExtensionName(strFile)
If strExtension = “doc” Then
objFS.CopyFile strFile , strDestination & strFileName
End If
Next
End If
End Sub
Carlosdl
29855 pts. | Aug 12 2009 4:14PM GMT
Grabber, it has nothing to do with the operating systems.
It gives you an error in 2008 because it is another machine, and it does not necessarily have the same directory structure and access permissions.
Are you sure the “c:\Transcriptsdocfiles” directory exists in the 2008 server and that you have access permissions on it ?
You might want to make some tests changing the code of your script, to see what you get back when the script has errors (and to confirm that the script is actually being executed).






