Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Passing arguments to a batchfile from a .txt file

$
0
0

I have a batch file, 

X.bat which creates the ftpparam.txt file.

It has a argument %1, I want to pass the value for thsi from the data in FILELIST.DAT. The dats in it is :---------- MALCOLM_201306120023.EXP

-------------------------------

set arg1=%1

set arg2=/processed/%1

IF EXIST ftpparam.txt DEL ftpparam.txt

echo open 196.35.45.42>>ftpparam.txt
echo minddump>>ftpparam.txt
echo ilbEidFocpikGel0>>ftpparam.txt
echo binary>>ftpparam.txt
echo prompt n>>ftpparam.txt
echo cd />>ftpparam.txt
echo rename %arg1% %arg2%>>ftpparam.txt
echo bye>>ftpparam.txt

-----------------------------------------------


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>