Having troble with a file path

itms

Active member
Joined
Feb 21, 2018
Messages
31
Programming Experience
10+
Hi I have a copy statement in a Batch file that is coping a file from a drive on one server to a folder on another server.
Looks like this:

copy "\\BELLXP\c$\csp\CSP Arcive\PPSInterData\*.txt" "O:\Vendors\Heaver Data\to ID"

Now this batch file works great

So in my VB app I have:

Dim path As String =
"\\BELLXP\c$\csp\CSP Arcive\PPSInterData\*.txt"
Dim path2 As String =
"O:\Vendors\Heaver Data\to ID"

' Move the file.
File.Copy(path, path2)[SUB][SUP]


[/SUP][/SUB]
This doe not work, it retunes an error stating "Error: Illegal characters in path."

Any ideas please of what I can do.

Thank you
 

JohnH

VB.NET Forum Moderator
Staff member
Joined
Dec 17, 2005
Messages
15,553
Location
Norway
Programming Experience
10+
Top Bottom