4

通过 cmd,我初始化curl http://path-to-my-domain以测试我网站中的某些内容。但是,我想至少初始化 20 次。有没有办法为此创建一个 .exe 文件,以便我可以单击它然后它会像循环一样执行?

4

1 回答 1

2

Why an exe? A simple batch file will work. (A text file with a .BAT extension containing commands to be executed)

Not sure what the purpose would be, but to call it 20 times with the same URL you could use:

for /l %%N in (1 1 20) do curl http://path-to-my-domain

If run from the command line then %%N must change to %N

If you want to call it with multiple URLs, then

curl http://path1
curl http://path2
curl http://path3
...
curl http://path20
于 2012-06-27T11:24:23.573 回答