0
votes

I am looking for some help with python script to create a Self Extracting Archive (SFX) an exe file which can be created by WinRar basically.

I would want to archive a folder with password protection and also split volume by 3900 MB so that it can be easily burned to a disk.

I know WinRar has command line parameters to create a archive, but i am not sure how to call it via python anyhelp on this would be of great help.

Here are main things I want: Archive Format - RAR Compression Method Normal Split Volume size, 3900 MB Password protection

I looked up everywhere but don't seem to find anything around this functionality.

1

1 Answers

0
votes

You could have a look at rarfile

Alternatively use something like:

from subprocess import call
cmdlineargs = "command -switch1 -switchN archive files.. path_to_extract"
call(["WinRAR"] + cmdlineargs.split())

Note in the second line you will need to use the correct command line arguments, the ones above are just as an example.