I have a script that is running and working fine. but it is using
strStoragePath2 = "C:\Reike\Email\"
StrFilePath = "C:\AC\Work\*.pdf"
objFSO.MoveFile StrFilePath, strStoragePath2
The problem is that if the folder has 10 files the first 9 are being moved and the last file is not. Has anyone ever had this problem before?
I tried changing the above to the following:
Dim colFiles
For Each objFile In colFiles
If LCase(Right(objFile.Name, 3)) = "pdf" Then
objFSO.Copyfile objFile, (strStoragePath3)
objFSO.DeleteFile objFile, True
End If
Next
But this alternative is not working at all. So I'm back to the original... moveFile. any suggestions? Its odd that all move with the exception of the last one.
strStoragePath2 = "C:\Reike\Email\"
StrFilePath = "C:\AC\Work\*.pdf"
objFSO.MoveFile StrFilePath, strStoragePath2
The problem is that if the folder has 10 files the first 9 are being moved and the last file is not. Has anyone ever had this problem before?
I tried changing the above to the following:
Dim colFiles
For Each objFile In colFiles
If LCase(Right(objFile.Name, 3)) = "pdf" Then
objFSO.Copyfile objFile, (strStoragePath3)
objFSO.DeleteFile objFile, True
End If
Next
But this alternative is not working at all. So I'm back to the original... moveFile. any suggestions? Its odd that all move with the exception of the last one.