PDA

View Full Version : LFORMAT in MS-DOS?



rl4engc
8th September 2015, 11:08
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:

Platypus
8th September 2015, 13:36
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.

woohoo
8th September 2015, 13:57
What about using PowerShell, perhaps modify this guys script.

https://perfp.wordpress.com/2010/08/25/mass-converting-video-files-using-powershell-and-handbrake/

NickFitz
8th September 2015, 21:21
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


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 :)

AtW
8th September 2015, 22:43
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

Contreras
8th September 2015, 22:45
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.
$ for f in *.MOV; do avconv -i "$f" "${f%.*}.mp4"; done

DimPrawn
9th September 2015, 08:11
Do it with a batch file.

https://grumpybear.wordpress.com/2011/05/22/batch-files-to-list-all-files-and-directories-in-a-folder/

Should be pretty simple.

darrylmg
9th September 2015, 22:14
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