Link to home
Start Free TrialLog in
Avatar of fester62
fester62Flag for United Kingdom of Great Britain and Northern Ireland

asked on

I want to use XCOPY toand have filenames with spaces.

I am using VBA and a shell comand to move files from one location on the network to another, e.g.

    retval = Shell("XCOPY" & " \\MYSERVER\DATA\D1\D2\D3\Input\Historic\My File.txt ANOTHERSERVER:\TestCopy", 0)

As you can see the filename in this example has a space and the copy fails because of this. I cannot change the filenames because of other dependencies. What is the syntax to use (from with a VBA module to get this to work?


Many thanks

PS this syntax works for filenames without spaces
ASKER CERTIFIED SOLUTION
Avatar of HooKooDooKu
HooKooDooKu

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial