passing variable to a batch file
- by sushant
i am calling a batch file for xcopy. i have the path of the file to b copied in variable a. my code is:
dim shell,z
z="for.bat " & a & " " & b & " " & c
set shell=createobject("wscript.shell")
shell.Run z, 1, true
where for.bat is:
for %%f in (%1,%2,%3) do xcopy %%f D:\shipment\ /e
when 'a' has small path like D:\flexcube, it works. but if i put some big path, say:
D:\flexcube1\New Folder\New Folder\New Folder\New Folder\New Folder\New Folder\New Folder\New Folder\New Folder\New Folder\New Folder
it does not work. is their some length restriction on %1 type variables or is this some other problem? any help is really appreciated.