Solved Batch File That Compresses VOB Files (and Deletes Them)?

meeshu

New member
Local time
5:50 AM
Messages
16
Having some difficulty in getting a batch file to compress each *.VOB file from a DVD and then deleting the original *.VOB file.

I'm fairly new to batch file writing, so I don't know much about it at the moment.

Here is the batch file I've created so far (to the extent of just compressing VOB files, and not deleting the original files yet) -

FOR %%a IN (*.VOB) DO (7z a -mx9 %%a *.VOB)

Running this batch gives an error and/or nothing seems to happen!?

There are approximately 20 VOB files on each DVD, and the batch file is intended to speed up the process of compressing each VOB using 7-zip ('7z' in the batch file, the 'a' means add to 7z archive, '-mx9' means use maximum compression, the following %%a is supposed to be the compressed archive/file name, and the *.VOB is supposed to be input file name).

Note that I can run 7-zip compression program (by itself) manually via the command line, so the Environment Variables have been set up properly. And by default, 7-zip will, or should, append the extension .7z to each compressed file.

How do I get this batch file to compress each VOB file?
 

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom build
OS
Windows 10 Pro x64, 7 Pro x64
CPU
Intel i5-3570k
Motherboard
ASRock Fatal1ty Z77 Performance
Memory
2 x 8 GB Corsair
Graphics Card(s)
GTX1650
Hard Drives
3 x Western Digital
PSU
EVGA
Internet Speed
Low End Broadband
Figured it out in the end.
 

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom build
OS
Windows 10 Pro x64, 7 Pro x64
CPU
Intel i5-3570k
Motherboard
ASRock Fatal1ty Z77 Performance
Memory
2 x 8 GB Corsair
Graphics Card(s)
GTX1650
Hard Drives
3 x Western Digital
PSU
EVGA
Internet Speed
Low End Broadband
Hi meeshu,

Figured it out in the end.

I am glad that you have found a solution to your problem/question. Can you please post the solution so that other people visiting this thread that have the same problem/question can benefit and learn from your experience.
Thank you! :thumbsup:
 

My Computer My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
Fujitsu LIFEBOOK
OS
Win 7 HP SP1 64-bit Vista HB SP2 32-bit Linux Mint 18.3
CPU
Intel(R) Pentium(R) CPU P6200 @ 2.13GHz
Motherboard
FUJITSU FJNBB06
Memory
4.00 GB
Graphics Card(s)
Intel(R) Graphics Media Accelerator HD
Sound Card
[1] Realtek High Definition Audio [2] Intel(R) Display Audio
Screen Resolution
1366 x 768 x 32 bits (4294967296 colors) @ 59 Hz
Hard Drives
TOSHIBA MK5076GSX
Antivirus
AVG FREE
Correct form should be -

FOR %%a IN (*.VOB) DO (7z a -mx9 %%a.7z %%a)
 

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom build
OS
Windows 10 Pro x64, 7 Pro x64
CPU
Intel i5-3570k
Motherboard
ASRock Fatal1ty Z77 Performance
Memory
2 x 8 GB Corsair
Graphics Card(s)
GTX1650
Hard Drives
3 x Western Digital
PSU
EVGA
Internet Speed
Low End Broadband

My Computer My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
Fujitsu LIFEBOOK
OS
Win 7 HP SP1 64-bit Vista HB SP2 32-bit Linux Mint 18.3
CPU
Intel(R) Pentium(R) CPU P6200 @ 2.13GHz
Motherboard
FUJITSU FJNBB06
Memory
4.00 GB
Graphics Card(s)
Intel(R) Graphics Media Accelerator HD
Sound Card
[1] Realtek High Definition Audio [2] Intel(R) Display Audio
Screen Resolution
1366 x 768 x 32 bits (4294967296 colors) @ 59 Hz
Hard Drives
TOSHIBA MK5076GSX
Antivirus
AVG FREE
Back
Top