开发者

Batch files/table read ins

I am trying to write a little script that will help my office 开发者_开发百科automate the uploading of zips and self extractors to a ftp site. They have to create several zips/se's and name them various different things etc.

My idea is for them to have a little table they could type in (i.e. the name they want the file to be called, the location of the upload, where they want it to extract to etc) and then my program would handle it effectively (so when they want to upload that 'row of data' they just select via a GUI and run the script).

I am new to batch files and programming in general. Just wondering if anyone has a tip for having a batch file read in data from a table somewhere?


if you want to do GUI , you can try HTA programming. you can create tables etc.


Will this help?

With data file Data.txt

One,Two,Three
A,B,C

Cmd file ReadData.cmd

@echo off

  for /f "tokens=1-3 delims=," %%A in (data.txt) do call :EachLine %%A %%B %%C

goto :eof 

:EachLine 
  @echo First is %1 Second is %2 Third is %3
goto :eof 

Gives output of

First is One Second is Two Third is Three
First is A Second is B Third is C
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜