Raised This Month: $12 Target: $400
 3% 

[batch] BZ2 pack/test integrity


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 04-01-2018 , 11:15   [batch] BZ2 pack/test integrity
Reply With Quote #1

Here is 2 useful .bat scripts (OS Windows) I wrote for:

1) Pack all files in .bz2 to upload in content-server

Reason:
Packed files in content server save your clients time,
when they try to download many amount of MB.
Besides, archive can be easily checked for integrity.

2) Test integrity of all .bz2 archives.

Reason:
Sometimes hoster works buggy, your FTP client can upload file partially,
so to ensure all ok you need to download all files back and check all bz2 by this script.
If some files damaged you have to try download it again to be sure,
because sometimes that dem. hoster give you file partially too.
Today I said him good bye and use my own FTP. But you can still use your
buggy free of charge hoster, where this script can help you found a damaged file.

PREPARING SCRIPTS
1. Download archive, unpack scripts to separate folder.
2. Download bzip2.exe + bzip2.dll (e.g. from here: http://gnuwin32.sourceforge.net/packages/bzip2.htm)
3. Download 7za.exe + 7z.dll (https://www.7-zip.org/download.html) (included in archive).

Place exe, dll next to .cmd script.

USAGE.
A. Script "bz2_compress.cmd"
(P.S. Use compress_bz2_7z.cmd for better compression)

Variant 1. Drag & Drop folder to this script (or create shortcut for him and drag & drop folder on shortcut).
Variant 2. Run script and it will pack everything in subfolders.
Variant 3. Drag & drop file on script.

WARNING. All files after packing will be removed (in variants 1, 2).

B. Script "test_arc.cmd"

Variant 1. Drag & Drop folder on it.
Variant 2. Run script within a folder you want to check all .bz2 for integrity.

C. Script "bz2_unpack.cmd"

Intended to unpack .bz2 archives recursively.
Using: Drag & drop folder on script.
All original .bz2 files will be deleted.

Good luck,
Alex Dragokas.
Attached Files
File Type: zip bz2_everything.zip (749.0 KB, 478 views)

Last edited by Dragokas; 01-24-2020 at 00:26. Reason: Packed everything to one archive including exe + dll
Dragokas is offline
ThatKidWhoGames
Veteran Member
Join Date: Jun 2013
Location: IsValidClient()
Old 04-10-2018 , 22:23   Re: [batch] BZ2 pack/test integrity
Reply With Quote #2

Thank you for this!!

Last edited by ThatKidWhoGames; 04-10-2018 at 22:23.
ThatKidWhoGames is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 04-19-2018 , 16:25   Re: [batch] BZ2 pack/test integrity
Reply With Quote #3

Added C. Script "bz2_unpack.cmd"

Just in case.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 11-30-2019 , 02:53   Re: [batch] BZ2 pack/test integrity
Reply With Quote #4

Added 7z bz2 compressor. It have a several bytes better compress level

Required file: %ProgramFiles(x86)%\7-Zip\7z.exe (default 7-zip installation location)
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

Last edited by Dragokas; 11-30-2019 at 02:54.
Dragokas is offline
Ermert1992
Member
Join Date: Jan 2012
Location: Germany
Old 12-11-2019 , 12:26   Re: [batch] BZ2 pack/test integrity
Reply With Quote #5

Thank you for this!!
__________________
Mfg Jonas


Ermert1992 is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:59.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode