I'm trying to get the (simple) bit of script to work.
If i put in the full filename of the file I am looking for, it works fine, but if i use the *(wildcard) it doesnt find the file.
I assume i've missed something simple and as you might have guessed, i'm no scipter!!
Set fso = CreateObject("Scripting.FileSystemObject")
BWFILE = "c:\sfdcprodtran\BWSFDC\UB*.dat"
BWUPLOAD = "c:\sfdcprodtran\BW\"
If fso.FileExists (BWFILE) then
fso.CopyFile BWFILE, BWUPLOAD
end if
For Each file In fso.GetFolder(BWUPLOAD).Files
Wscript.echo "File found."
Next
If i put in the full filename of the file I am looking for, it works fine, but if i use the *(wildcard) it doesnt find the file.
I assume i've missed something simple and as you might have guessed, i'm no scipter!!
Set fso = CreateObject("Scripting.FileSystemObject")
BWFILE = "c:\sfdcprodtran\BWSFDC\UB*.dat"
BWUPLOAD = "c:\sfdcprodtran\BW\"
If fso.FileExists (BWFILE) then
fso.CopyFile BWFILE, BWUPLOAD
end if
For Each file In fso.GetFolder(BWUPLOAD).Files
Wscript.echo "File found."
Next