I'm seeing if anyone knows of a bat file that I can just drag a video file onto and increment the filename every time I drag a video file to the bat file.
It would have to check for previous filename, then ffmpeg will render it with an incremented filename.
Eg: Scene_001.mov and Scene_002.mov already exists in the folder. When I drag the video file to the bat file , it should render it as Scene_003.mov.
Hope that makes sense.
Help appreciated.
		
			+ Reply to Thread
			
		
		
		
			
	
	
				Results 1 to 3 of 3
			
		- 
	
- 
	this should work, fill in/correct underlined parts : 
 Code:@echo off setlocal EnableDelayedExpansion SET "ffmpeg=your_path_to\ffmpeg.exe" SET "output_folder=D:\rendered_files" SET "extension=mov" SET "prefix=Scene_" rem do not set this, just define it empty: SET "output_path=" call :get_output_path "%output_folder%" %prefix% %extension% rem here goes your ffmpeg command line where %1 is input file and "%output_path%" is your destination "%ffmpeg%" -i %1 ..... your filters end such ..... "%output_path%" echo Done endlocal & echo press any key to exit ... & pause>nul & goto :eof :get_output_path <output folder> <prefix> <extension> SET "i=0" SET "formated_value=000" :loop SET "output_path=%~1\%~2%formated_value%.%3" if exist "%output_path%" call :increase& goto :loop goto :eof :increase SET /a "i=%i%+1" SET "value=000000%i%" SET "formated_value=%value:~-3%" goto :eof Last edited by _Al_; 22nd Nov 2019 at 18:55. 
Similar Threads
- 
  ffmpeg 4.1.4 question regarding "limited color range" output fileBy bokeron2020 in forum Newbie / General discussionsReplies: 12Last Post: 1st Aug 2019, 18:28
- 
  How to set ffmpeg File Path on Batch FileBy Daringbaaz in forum Newbie / General discussionsReplies: 2Last Post: 28th Jul 2019, 06:55
- 
  Batch file to create nfo files for multiple videosBy olpdog in forum ProgrammingReplies: 2Last Post: 16th Jul 2019, 13:47
- 
  Can I use ffmpeg to create a script to download links from a .txt file?By Serenity23 in forum Video Streaming DownloadingReplies: 0Last Post: 1st Dec 2016, 22:55
- 
  Can I get a little help with an ffmpeg script/batch file?By Iced Coffee in forum Newbie / General discussionsReplies: 14Last Post: 26th Aug 2015, 02:56


 
		
		 View Profile
				View Profile
			 View Forum Posts
				View Forum Posts
			 Private Message
				Private Message
			 
 
			
			

 Quote
 Quote