Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Batch File That Compresses VOB Files (and Deletes Them)?

3 Weeks Ago   #1
meeshu

Windows 7 Pro x64, 7 Pro x86, XP - Multiboot setup
 
 
Batch File That Compresses VOB Files (and Deletes Them)?

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 System SpecsSystem Spec
.
3 Weeks Ago   #2
meeshu

Windows 7 Pro x64, 7 Pro x86, XP - Multiboot setup
 
 

Figured it out in the end.
My System SpecsSystem Spec
3 Weeks Ago   #3
Paul Black

7 HP SP1 64-bit Vista HB SP2 32-bit Linux Mint 18.3
 
 

Hi meeshu,

Quote   Quote: Originally Posted by meeshu View Post
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!
My System SpecsSystem Spec
.

3 Weeks Ago   #4
meeshu

Windows 7 Pro x64, 7 Pro x86, XP - Multiboot setup
 
 

Correct form should be -

FOR %%a IN (*.VOB) DO (7z a -mx9 %%a.7z %%a)
My System SpecsSystem Spec
3 Weeks Ago   #5
Paul Black

7 HP SP1 64-bit Vista HB SP2 32-bit Linux Mint 18.3
 
 

Quote   Quote: Originally Posted by meeshu View Post
Correct form should be -

FOR %%a IN (*.VOB) DO (7z a -mx9 %%a.7z %%a)
Thanks meeshu.
My System SpecsSystem Spec
Reply

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




Thread Tools




Similar help and support threads
Thread Forum
How can I tell Winrar to delete the complete files as it compresses?
So I have 42gb of priceless tv shows that are taking up too much space on my comp... What I want to do is compress these files. The only issue is that in order compress I need the room for the uncompressed AND compressed files. Is there a way I can tell Winrar to delete complete files as it is...
Software
Explorer Changes Compresses jpg files after Date Change
I can not believe this is happening. I right click on a 744KB jpg file, select Properties > Details and I correct the date which was incorrectly set in the camera. Then I click OK or Apply. Now the file size is down to 334KB. Explorer has recompressed the file on some lower quality setting! I...
Music, Pictures & Video
Batch File that grabs file names from folder to insert into batch file
Ok I'm totally at a loss on how to word this so I'm just going to write it out the best that I can... :confused: First I have a batch file that I'm writing that will convert mp4 files to mp3 files (I have a lot) for a buddies band using ffmpeg. Here's the code that I'm using: ffmpeg -i...
General Discussion
How to create a batch file that will move files based on the file type
How to create a batch file that will move files based on the file type? My Requirement : I need a batch file to copy all .doc files in all my HardDisk to a removable disk say (Z: drive) . Can anyone make it possible using a batch file?Please...Its urgent...
General Discussion
Batch file for moving files to folder?
Hello, Wanted to see if any one here wouldn't mind writing a batch file or script that would move multiple files to a target folder. Here are the specifics: HDD1 Contains Folders A,B,C,etc... Folder A contains Folder A1 which contains File A2 Folder B contains Folder B1 which contains File B2...
General Discussion


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 15:52.
Twitter Facebook Google+