English 中文(简体)
使用批量文件对多个文件执行命令
原标题:Execute a command over multiple files with a batch file

我有一个.exe 文件, 它将两个 jpg 图像作为参数, 并对它们进行一些处理 。 所以, cmd 命令是 :

myfile.exe base_image.jpg image1.jpg

第一个图像是标准图像, 而第二个图像是标准图像, 而第二个图像会更改, 我需要将此执行执行重复超过 50000 图像。 所以在每次迭代中, 命令会被修改 。

myfile.exe base_image.jpg image2.jpg

myfile.exe base_image.jpg image3.jpg

...

myfile.exe base_image.jpg image50000.jpg

重写时我需要执行此操作 : d [ 1500] myfiles.exe base_image.jpg image%d.jpg

所有必需的文件都放置在同一文件夹中。 是否有可能为此任务写入批次文件?

最佳回答

这是一个单命令, 所以您不需要批量文件

for /l %%a in (1,1,50000) do myfile.exe base_image.jpg image%%a.jpg
问题回答

暂无回答




相关问题
complex batch replacement linux

I m trying to do some batch replacement for/with a fairly complex pattern So far I find the pattern as: find ( -name *.php -o -name *.html ) -exec grep -i -n hello {} + The string I want ...

How to split a string by spaces in a Windows batch file?

Suppose I have a string "AAA BBB CCC DDD EEE FFF". How can I split the string and retrieve the nth substring, in a batch file? The equivalent in C# would be "AAA BBB CCC DDD EEE FFF".Split()[n]

How to check which Operating System?

How can I check OS version in a batch file or through a vbs in an Windows 2k/2k3 environment ? You know ... Something like ... : "If winver Win2k then ... or if winver Win2k3 then ....

热门标签