Hi! I have been compressing programs on a Win98SE system with a 2.1GB
hard drive using 7Zip and creating batch files to decompress them, wait
for the user to finish using them and then recompressing them. Now, I
have two options: either create a program to automate the process or do
it myself. If anybody out there is interested in this, I may create the program. Are you interested?
On Thu, 26 Aug 2021 13:30:01 -0700 (PDT), Harry Potter wrote:I'm sorry. I thought this was on topic, as it's about Win32. :(
Hi! I have been compressing programs on a Win98SE system with a 2.1GBSince you seems to deliberatly post off topics to multiple newsgroups, are you interrested on being plonked?
hard drive using 7Zip and creating batch files to decompress them, wait
for the user to finish using them and then recompressing them. Now, I
have two options: either create a program to automate the process or do
it myself. If anybody out there is interested in this, I may create the program. Are you interested?
On Thursday, August 26, 2021 at 9:29:24 PM UTC-4, JJ wrote:
On Thu, 26 Aug 2021 13:30:01 -0700 (PDT), Harry Potter wrote:I'm sorry. I thought this was on topic, as it's about Win32. :(
Hi! I have been compressing programs on a Win98SE system with a 2.1GBSince you seems to deliberatly post off topics to multiple newsgroups, are >> you interrested on being plonked?
hard drive using 7Zip and creating batch files to decompress them, wait
for the user to finish using them and then recompressing them. Now, I
have two options: either create a program to automate the process or do
it myself. If anybody out there is interested in this, I may create the
program. Are you interested?
... to automate the process ...
If anybody out there is interested in this
I thank you for your honesty.
The automation is simply compressing the application and
writing the batch file to temporarily decompress the application.
I can use PAUSE to wait for the user to finish using the application
and press a key in the window.
Harry,It is not necessary, but I thought it may help others. Or, I could post one example batch file for others to edit and use. Unfortunately, 7Zip doesn't always work on my Win98SE system, and, sometimes, I have to choose the Deflate technique on a .zip
I thank you for your honesty.I have no reason to lie to you, as it would benefit neither me nor you.
The automation is simply compressing the application andI did not consider the first compression, but yes, that is what I thought you where after.
writing the batch file to temporarily decompress the application.
I can use PAUSE to wait for the user to finish using the applicationYes you can. But that doesn't really leave much automation, now does it.
and press a key in the window.
:-)
Also, do check what happens when you forget to press a button in that window before you tell Windows to shut down. There is a chance that the recompression will than simply not take place, resulting in that the next time the users modified but not-stored files will b overwritten by old copies. There is also a possibility that the packing process will be started, but possibly forcefully killed because it takes too long. Definitily not good.
Regards,
Rudy Wieser
Unfortunately, 7Zip doesn't always work on my Win98SE system,
and, sometimes, I have to choose the Deflate technique on a .zip file.
It doesn't delete the compressed file during use,
but if it is interrupted during recompression, the compressed file...
will be corrupted.
I could design the batch files to skip the delete step
Harry,On an archive I packed.
Unfortunately, 7Zip doesn't always work on my Win98SE system,On an archive you packed up yourself, or just on archives you downloaded ?
and, sometimes, I have to choose the Deflate technique on a .zip file.
In the first case thats odd, as you would expect that 7Zip will be able to unpack what it has packeded itself ...
I'm responsible enough not to kill the batch file during the recompress operation. :)It doesn't delete the compressed file during use,I didn't think you would. But in the first case I described that the next time you start the unpack-wait-repack cycle it will unpack a file from the archive, and by it overwrite the newer(!) file thats still on disk because
it wasn't packed due to the shutdown of the machine.
but if it is interrupted during recompression, the compressed file...
will be corrupted.
I could design the batch files to skip the delete stepYes, you could. But it would not help, as the "that process takes to long
to finish, just kill it" would most likely be aimed at the batchfile itself /and/ any childprocesses it started. IOW, the re-compress line (which
could take too long) would be the last one the batchfile would be executing. Though that ofcourse means that any "delete those files" commands afterwards won't be executed either (you will still have the origionals). :-)
And assuming that 7Zip is not stupid it will not overwrite the existing
(old) archive, but create a temporary-named new one and only when it
finishes succesfully attempt to remove the old archive and give the new archive its name. IOW, when the packing process is killed (or just fails)
you should still have a working (but old) archive.
And when that happens (you keep the working old archive) you have a same problem as with the first case I described : the archive than could have older versions of the newer versions that you still have on disk, and the next unpack-wait-repack cycle would overwrite those newer files.
But maybe the 7Zip program has a comandline option instructs them *not* to overwrite target files that already are on disk and are newer.
I also seem to remember a commandline option that automatically deletes the sources of all just-achived files after finishing successfully. Maybe 7Zip has that one too. Saves several batchfile steps.
On an archive I packed.
I'm responsible enough not to kill the batch file during the recompress operation. :)
I think it is smart enough. However, when I decompress an
archive across drives, the result is in the wrong drive.
...And when that happens (you keep the working old archive)
I don't understand. :(
But maybe the 7Zip program has a comandline option instructs them *not*Again, I don't understand. :(
to overwrite target files that already are on disk and are newer.
...I also seem to remember a commandline option that automatically deletes
the sources of all just-achived files after finishing successfully.
Okay. Let me check.
if 7Zip returns an error, I can skip the delete-after-recompression step
and try to recompress the software manually
I *could* post an example batch file online
Harry,Thank you.
if 7Zip returns an error, I can skip the delete-after-recompression stepThats a very good change/addition. :-)
and try to recompress the software manuallyI would suggest you to try to combine that with your current batchfile. Having to remember "special stuff" that you seldom need often takes extra "how the heck did I do that again?" work.
For instance, when you use the "no overwrite on uncompress" 7Zip argument
you could simply run your uncompress-wait-compress batchfile again.
If you also add a "don't uncompress or wait" argument to your batchfile you can use it for doing the first compress as well as a freshI'd rather do it manually in that case instead of having the batch file accept the argument, as it would be easier than opening the command line, switching folders and running the batch file with the switch.
recovery/recreate.
I *could* post an example batch file onlineAnother good idea. That way we could possibly spot stuf that won't quite
work as you would expect it to, as well as making it easier to suggest stuff and where to add it.
I already did. The manual compression will be done if and only
if the batch file failed to recompress the program properly.
For instance, when you use the "no overwrite on uncompress" 7Zip
argument you could simply run your uncompress-wait-compress
batchfile again.
I *could* do that.
I'd rather do it manually in that case instead of having the batch file accept the argument, as it would be easier than opening the command
line, switching folders and running the batch file with the switch.
Harry,My definition of "manual" is using the 7Zip file manager to do it.
I already did. The manual compression will be done if and onlyI get the feeling that your definition of "manual recompression" is
if the batch file failed to recompress the program properly.
different from mine ...
For instance, when you use the "no overwrite on uncompress" 7Zip
argument you could simply run your uncompress-wait-compress
batchfile again.
I *could* do that.:-) All I have given you is a "have you thought of {this}" suggestion.
They are options for you to consider. Its fully upto you if you want to use them.
I'd rather do it manually in that case instead of having the batch file accept the argument, as it would be easier than opening the commandAls long as all the files are in a single folder that will ofcourse work. Anything more complex and its not a question of /if/, but /when/ you will forget something when doing a manual recovery.
line, switching folders and running the batch file with the switch.
But have you already thought of creating a "recovery" batchfile ? One
which does nothing more that calling the actual batchfile with the
"recovery" switch ? Just give it a good name so its not directly
above/under the actual batchfile (so you do not click it by mistake), or
just put them in a "recovery" folder.
But do notice that when you add the "do not overwrite on decompress" 7Zip switch when you decompress than a "manual recovery" becomes as simple as running the batchfile again, and you would have little need for a batchfile switch. :-)
My definition of "manual" is using the 7Zip file manager to do it.
Anything more complex and its not a question of /if/, but /when/ youSome of my programs decompress to two or more folders, but I use
will forget something when doing a manual recovery.
separate commands for each.
7Zip will ask to overwrite the files first.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 379 |
Nodes: | 16 (2 / 14) |
Uptime: | 42:26:01 |
Calls: | 8,141 |
Calls today: | 4 |
Files: | 13,085 |
Messages: | 5,857,851 |