Jump to content
LaunchBox Community Forums

Recommended Posts

spacer.png

Greetings everyone! 

I wrote this script a couple of years ago and never found anywhere to share it however, since falling down the emulation rabbit hole I figured here would be a good place to share it :) 

So what is it?

It is a simple batch file (.bat) that uses 7 Zip with Ultra compression to speed up the archiving process when dealing with a lot of individual files. It also has a couple of other functions that I added out of necessity more than anything.

Archive Files

This simply archives a single file in to a single archive with the name of the archive the same as the file which was archived.

Archive Folders

This allows you archive a folder and its contents in to a single archive. The archive will have the same name as the folder which was archived.

Archive Folder (without root folder)

This does the same as the the above except that it doesn't include the folder. It will look inside the folder and archive the contents only. The archive will be named as the folder in which the files were stored.

Delete files

This allows you to delete files based on the file extension which you enter in to the prompt (with the dot). The script will automatically ask if you wish to do this once it has finished archiving what is there. 

WARNING - Files are deleted fully! They are not sent to the Recycle Bin.

Rename PBP Files Using Parent Folder Title

This will rename the EBOOT.pbp file to match the name of the folder it is in. I have mine done like this for use in emulators on my PC. Obviously for the PSP you will have to rename them back to EBOOT.pbp.

How to use?

To use it simply put the .bat file in to the folder you which to work in, run it and pick the option you want. You will also have to have 7 Zip installed also (it checks for it when you run the script). The .bat file is commented and can be read/viewed in Notepad or any other basic text editor so feel free to mess around and add things to it for your own usage.

Disclaimer - The code contain I didn't actually write, I simply searched for what I wanted to do and pulled the relevant code from elsewhere. I have however used this tool for a number of years (as I mentioned) and it has worked brilliantly.

Anyway I hope you enjoy and find it useful!

Stoner81.

(7z Batch Archive Files and Cleanup).bat

Edited by Stoner81
Fixing formatting errors.
  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...