passing variable to a batch file
Posted
by sushant
on Stack Overflow
See other posts from Stack Overflow
or by sushant
Published on 2010-05-25T07:38:06Z
Indexed on
2010/05/25
7:41 UTC
Read the original article
Hit count: 227
batch-file
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.
© Stack Overflow or respective owner