EDIT: My program takes filetypes as string inputs, then loops through a directory converting matching filetypes. The converted files get prepending with "output". Currently, the loop runs infinitely if the target filetype and conversion filetype are the same, as it adds each converted file back into the loop.
How can I get my loop to NOT match on filenames that contain output
?
set /p from="Enter filetype to convert from: "
set /p to="Enter filetype to convert to: "
for %%A in (*.%from%) DO (if findstr /V /I /S /L /C:"output" "%%A" (ffmpeg -i "%%A" -max_muxing_queue_size 9999 "output-%%A.%to%"))
pause
This just errors, but without the negative match it gets stuck in an infinite conversion loop if the filetype variables are the same. Because the loop prepends a "output" to the file, thats what I want to negatively match with.
EDIT: Sample input: mp4 mp4 Output will just put converted files in the same directory.