Batch to copy the name of .avi file to a .srt file


I have done a batch to copy the name of a .avi file to a .srt file. The problem is that the .srt file became with the ".avi" string within the name. Example:

Before my batch file:

After my batch file:

I tried to erase the ".avi" string in the .srt file but I have no sucess. Here is the code:

[code]@echo off
dir *.mp3 /b "C:Batch files" >>filelist.txt

for /f "tokens=1* delims=|" %%a in (filelist.txt) do (

ren *.srt "%%a".srt

del filelist.txt[/code]

Can someone help me please?
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!