如何在变数中执行字符串操作的循环? [英] How do I perform string operations on variables in a for loop?
本文介绍了如何在变数中执行字符串操作的循环?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这听起来很愚蠢,但我不能得到它的工作。我想我只是不明白'%% V,%V%和%V之间的区别
This sounds dumb, but I can't get it to work. I think i just dont' understand the difference between %%v, %v% and %v
下面就是我想要做的:
for %%v in (*.flv) do ffmpeg.exe -i "%%v" -y -f mjpeg -ss 0.001 -vframes 1 -an "%%v.jpg"
此成功地产生用于每个电影的缩略图,但问题是:
This successfully generates a thumbnail for each of the movies, but the problem is:
movie.flv -> movie.flv.jpg
所以我想要做的是拉最后4个字符关闭 %% v什么
并使用第二个变量。
我一直想这样的事情:
%%v:~0,-3%
但它不工作,也不是任何的迭代,我能想到的。
But it's not working, nor are any of the iterations of that that I could think of.
任何想法?
推荐答案
使用%%〜纳伏来获取文件名而已。
Use %%~nV to get the filename only.
这篇关于如何在变数中执行字符串操作的循环?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文