Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » How to batch generate new files with the same file name as the original but different extensions?
View 1,591 Replies 13
Credits 20 Posts 9 Joined 2007-04-21 00:17 19-year member UID 85898 Gender Male
Status Offline
mencoder.exe -ffourcc FLV1 -of lavf -lavfopts E:\别拿豆包不当干粮02.rmvb -o E:\\别拿豆包不当干粮02.flv
This is the generation parameters and method of my program
Run in DOS
I want to generate all files in this folder
So mencoder.exe -ffourcc FLV1 -of lavf -lavfopts *.rmvb -o *.flv
That is, the new file has the same name as the original file. How to do it? Please help the expert!!!
[ Last edited by xlfj521 on 2007-4-21 at 08:42 AM ]
Recent Ratings for This Post
( 3 in total)Click for details
Credits 101 Posts 47 Joined 2007-04-18 16:05 19-year member UID 85634 Gender Male
Status Offline
for /f "skip=5 tokens=4 delims=. " %i in ('dir *.rmvb') do del %i.rmvb&imencoder.exe -ffourcc FLV1 -of lavf -lavfopts %i.rmvb -o %i.flv
Try it yourself
Credits 101 Posts 47 Joined 2007-04-18 16:05 19-year member UID 85634 Gender Male
Status Offline
.......I also followed and went silly
for /f "skip=5 tokens=4 delims=. " %i in ('dir *.rmvb') do del %i.rmvb&imencoder.exe -ffourcc FLV1 -of lavf -lavfopts %i.rmvb -o %i.flv
Credits 3,687 Posts 1,467 Joined 2005-08-08 12:00 20-year member UID 44210
Status Offline
Originally posted by chkau at 2007-4-21 10:50:
He was going to change the RMVB video file into a flash file. Just renaming it directly results in a bunch of unexecutable garbage files.
That's not called renaming at all, it's purely format conversion. Then the initial title was off-topic.
Credits 2,725 Posts 1,160 Joined 2006-09-23 12:00 19-year member UID 63486 From 河北廊坊
Status Offline
The landlord's problem really can't be solved just by changing the name. It is suggested that the landlord should first make up for computer knowledge.