I want to run a command on all files in a directory. For %%1 in (c\conversion*.ajt) do convert command %%1 %%2 However I need to have an output filename the same as the input but with a different file extension.
asciitojt.exe filename1.ajt filename1.jt
asciitojt.exe filename2.ajt filename2.jt
asciitojt.exe filename3.ajt filename3.jt
is what I want to get out of the system.
How do I replace the last 3 characters?
This is to run in a batch file.
Try this:
for %%i in (*.ajt) do "asciitojt.exe" "%%~i" "%%~ni.jt"
Start in the folder with the *.ajt files.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With