• Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

LFORMAT in MS-DOS?

rl4engc

Fingers like lightning
Joined
Dec 1, 2008
Messages
681
Likes received
187
Thanks received
50
This one's for the slightly older generation.. :)

I seem to recall on MSDOS you could for example list a directory structure, but modify the output with LFORMAT="..." (Line Format?) e.g. to generate a batch file. Suppose I have a directory of .MOV files I want to convert to .mp4. I thought I could go something like this:

DIR /b *.MOV LFORMAT="avconv.exe -i %1.MOV %1.mp4"

which would produce (I seem to recall you could extract just the filename without extension somehow) :

avconv.exe -i MOV_0001.MOV MOV_0001.mp4
avconv.exe -i MOV_0002.MOV MOV_0002.mp4
avconv.exe -i MOV_0003.MOV MOV_0003.mp4

etc.

Google produces nothing that I can see? Am I going mad? :confused:
 
I don't recall that.

The answer to your problem is to install a Unix-like shell so that you can fire up a (shell) command window and achieve what you want albeit with rather different commands. If you have no Unix Shell knowledge, it'll be hard to do, although many on here could tell you the commands you need to get the result you want.
 
Could it be that LFORMAT was a batch file or other command on the system you remember using this on? MSDN has nothing about LFORMAT, but something like

Code:
DIR /b *.MOV | LFORMAT="avconv.exe -i %1.MOV %1.mp4"

(note the | to pipe the DIR output into LFORMAT) would do what you describe, if you can find the missing LFORMAT command :)
 
Am I going mad? :confused:

Yes.

Instead of going back in time in your wonderful Time Machine you should go FORWARD and get next week's lottery numbers and share them with me.

:eyes
 
I don't recall that.

The answer to your problem is to install a Unix-like shell so that you can fire up a (shell) command window and achieve what you want albeit with rather different commands. If you have no Unix Shell knowledge, it'll be hard to do, although many on here could tell you the commands you need to get the result you want.

e.g.
Code:
$ for f in *.MOV; do avconv -i "$f" "${f%.*}.mp4"; done
 
This one's for the slightly older generation.. :)

I seem to recall on MSDOS you could for example list a directory structure, but modify the output with LFORMAT="..." (Line Format?) e.g. to generate a batch file. Suppose I have a directory of .MOV files I want to convert to .mp4. I thought I could go something like this:

DIR /b *.MOV LFORMAT="avconv.exe -i %1.MOV %1.mp4"

which would produce (I seem to recall you could extract just the filename without extension somehow) :

avconv.exe -i MOV_0001.MOV MOV_0001.mp4
avconv.exe -i MOV_0002.MOV MOV_0002.mp4
avconv.exe -i MOV_0003.MOV MOV_0003.mp4

etc.

Google produces nothing that I can see? Am I going mad? :confused:

Take a look on this guy's site.
I always use it for this sort of stuff.
He does exactly what you want using substitution variables.

http://www.robvanderwoude.com/batchfiles.php
 

Advertisers

Back
Top