Reputation: 45
I am working with a VB.net project. I was using the command promt (cmd). I told the CMD to do: Copy /b path1 + path2 destination
However the cmd thought my path was a FileName. So how do i tell cmd that it is a path and not FileName.
//Thank you!
PS. the path are not the same so i could not use for example: CD C:\mydocs\
Upvotes: 0
Views: 335
Reputation: 888293
You need to put a \
at the end of the path to show copy
that it's a directory.
EDIT: You need to put your path in quotes ("..."
) to force the shell's argument parser to pass the entire path as one.
Upvotes: 1
Reputation: 546193
Don’t use the command prompt for that, use the System.IO.File.Copy
method of the .NET framework instead.
… obviously, the same goes for other methods that exist in the framework. If you don’t know whether a certain method exists, try searching the MSDN.
Upvotes: 1