ProgrammerTed
New member
- Local time
- Today, 12:18
- Joined
- Jan 9, 2009
- Messages
- 2
Hello Everyone!
This seems like such straight forward code that I can't fgure out what the heck is going wrong. Here's the code:
********** BEGIN CODE ***************
Set fs = CreateObject("Scripting.FileSystemObject")
For intCurrentRow = 0 To lstDocuments.ListCount - 1
If lstDocuments.Selected(intCurrentRow) = True Then
strDocument = strDocLocation & lstDocuments.ItemData(intCurrentRow)
fs.CopyFile strDocument, strUSBDrive
End If
Next intCurrentRow
Set fs = Nothing
********** END CODE ***************
The value of strDocument is "t:\trackerdocs\docs\test1.txt". The value of strUSBDrive is "d:\".
I'm getting a path not found error. The information in the strDocument variable is accurate and the file does exist. And, I've confirmed that the d:\ drive is, indeed, the USB drive.
What's the problem? Is it syntax related? I've tried ommitting the "\" from the USB drive path, and that doesn't work either.
Thanks in advance,
Ted
This seems like such straight forward code that I can't fgure out what the heck is going wrong. Here's the code:
********** BEGIN CODE ***************
Set fs = CreateObject("Scripting.FileSystemObject")
For intCurrentRow = 0 To lstDocuments.ListCount - 1
If lstDocuments.Selected(intCurrentRow) = True Then
strDocument = strDocLocation & lstDocuments.ItemData(intCurrentRow)
fs.CopyFile strDocument, strUSBDrive
End If
Next intCurrentRow
Set fs = Nothing
********** END CODE ***************
The value of strDocument is "t:\trackerdocs\docs\test1.txt". The value of strUSBDrive is "d:\".
I'm getting a path not found error. The information in the strDocument variable is accurate and the file does exist. And, I've confirmed that the d:\ drive is, indeed, the USB drive.
What's the problem? Is it syntax related? I've tried ommitting the "\" from the USB drive path, and that doesn't work either.
Thanks in advance,
Ted