BetaArchive Logo
Navigation Home Screenshots Image Uploader Server Info FTP Servers Wiki Forum RSS Feed Rules Please Donate
UP: 23d, 1h, 10m | CPU: 27% | MEM: 5711MB of 10928MB used
{The community for beta collectors}

Forum rules


Any off topic discussions should go in this forum. Post count is not increased by posting here.
FTP Access status is required to post in this forum. Find out how to get it


Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 19 posts ] 
Author Message
 PostPost subject: A little project for someone to take on if they wish...        Posted: Tue Mar 13, 2007 5:08 am 
Administrator
User avatar
Offline

Joined
Fri Aug 18, 2006 11:47 am

Posts
12473

Location
Merseyside, United Kingdom

Favourite OS
Microsoft Windows 7 Ultimate x64
Hello all,

Im looking for someone to take on a small project for me. Its doesnt have to be complicated, it just has to do the job and be easy to use.

Basically I need a batch file/program of some sort that will:
1. Extract a RAR file in a folder into a temp folder
2. Recompress the contents of that file with "Best" compression using the same filename as the original.
3. Remove the temp files.
4. Remove the original file.
5. Move the new file to the location of the old file.
6. Loop to the beginning and start the next file.

If possible Id like it to check the RAR files current compression rate, but Im not sure if WinRAR allows this.

Incase anyone is wondering, I need this so we can significantly reduce the usage on the FTP server. This will also help with download times since the files will be smaller.

_________________
Image

BetaArchive Discord: https://discord.gg/epK3r6A


Last edited by Andy on Sat Jun 09, 2007 4:34 pm, edited 1 time in total.

Top  Profile  WWW
 PostPost subject: Re: A little project for someone to take on if they wish...        Posted: Tue Mar 13, 2007 6:53 am 
Donator
Offline

Joined
Sat Aug 19, 2006 1:25 am

Posts
590

Location
Israel
I can write a small shell script to do that, but you'll have to install bash and coreutils (a minimal Cygwin installation will do the trick).


Top  Profile
 PostPost subject:        Posted: Tue Mar 13, 2007 6:54 am 
Administrator
User avatar
Offline

Joined
Fri Aug 18, 2006 11:47 am

Posts
12473

Location
Merseyside, United Kingdom

Favourite OS
Microsoft Windows 7 Ultimate x64
Like I said, simple. Wouldn't a BAT file be able to do it?

_________________
Image

BetaArchive Discord: https://discord.gg/epK3r6A


Top  Profile  WWW
 PostPost subject:        Posted: Tue Mar 13, 2007 7:16 am 
Donator
Offline

Joined
Sat Aug 19, 2006 1:25 am

Posts
590

Location
Israel
I have no idea how to loop the operation for each file. The rest can be easily done, though (maybe except for comparing the ratios). BAT files are just not powerful enough (and I have zero experience with Windows PowerShell).


Top  Profile
 PostPost subject:        Posted: Tue Mar 13, 2007 10:31 am 
FTP Access
Offline

Joined
Thu Aug 24, 2006 6:28 pm

Posts
352
BAT files can do loops.

You'll need to use the rar.exe program inside the winrar folder for this job.


Top  Profile
 PostPost subject:        Posted: Tue Mar 13, 2007 9:49 pm 
Donator
Offline

Joined
Sat Aug 19, 2006 1:25 am

Posts
590

Location
Israel
expert01 wrote:
BAT files can do loops.

They can, but only predefined ones AFAIK. I guess another BAT file could generate a new one with a list of all the required files, but it would be very clumsy.

EDIT: Yeah, I still believe relying upon a standard UNIX shell that needs to be installed is simpler than writing complicated BAT files. bash and coreutils are just a 7 MB download combined, and with the Cygwin installer, the whole installation (including the download) takes about 3 minutes.


Top  Profile
 PostPost subject:        Posted: Wed Mar 14, 2007 7:29 am 
FTP Access
Offline

Joined
Sun Aug 27, 2006 6:37 pm

Posts
177

Location
UK, Home of RISCOS
You could use the commandline version of winrar.

_________________
Image


Top  Profile
 PostPost subject:        Posted: Wed Mar 14, 2007 7:31 am 
Administrator
User avatar
Offline

Joined
Fri Aug 18, 2006 11:47 am

Posts
12473

Location
Merseyside, United Kingdom

Favourite OS
Microsoft Windows 7 Ultimate x64
ewan275 wrote:
You could use the commandline version of winrar.


Thats pretty obvious, but its making something to interact with it to do the job at hand thats the problem.

_________________
Image

BetaArchive Discord: https://discord.gg/epK3r6A


Top  Profile  WWW
 PostPost subject: $50        Posted: Wed Mar 14, 2007 8:32 am 
Donator
Offline

Joined
Tue Oct 17, 2006 8:26 pm

Posts
932
and its yours


Top  Profile
 PostPost subject: Re: $50        Posted: Wed Mar 14, 2007 8:35 am 
Administrator
User avatar
Offline

Joined
Fri Aug 18, 2006 11:47 am

Posts
12473

Location
Merseyside, United Kingdom

Favourite OS
Microsoft Windows 7 Ultimate x64
RentedMule wrote:
and its yours


Yes it may be my problem, but Im asking for help. If you don't want to or can't help then don't post in the topic. Comments like that are pointless and annoying.

_________________
Image

BetaArchive Discord: https://discord.gg/epK3r6A


Top  Profile  WWW
 PostPost subject: ...        Posted: Wed Mar 14, 2007 12:17 pm 
Donator
Offline

Joined
Tue Oct 17, 2006 8:26 pm

Posts
932
rubbish. I offered him one hour of my time for a product he wanted. It's much cheaper than my normal rate. Don't hate because my time is worth something.


Top  Profile
 PostPost subject: Re: ...        Posted: Wed Mar 14, 2007 5:37 pm 
Administrator
User avatar
Offline

Joined
Fri Aug 18, 2006 11:47 am

Posts
12473

Location
Merseyside, United Kingdom

Favourite OS
Microsoft Windows 7 Ultimate x64
RentedMule wrote:
rubbish. I offered him one hour of my time for a product he wanted. It's much cheaper than my normal rate. Don't hate because my time is worth something.


Who said anyone way paying someone? And where did you say any particular rate?

_________________
Image

BetaArchive Discord: https://discord.gg/epK3r6A


Top  Profile  WWW
 PostPost subject: Here        Posted: Thu Mar 15, 2007 2:53 am 
Donator
Offline

Joined
Tue Oct 17, 2006 8:26 pm

Posts
932
Sometimes you PAY for work to get it done right... you know, like the difference between letting your 8 year old son mow the grass and a landscaping business.

Anyway, the topics in this forum are pretty worthless seeing as no one even notices them. I left the price of $50 in my topic. It was simply overlooked.


Top  Profile
 PostPost subject:        Posted: Thu Mar 15, 2007 2:56 am 
Administrator
User avatar
Offline

Joined
Fri Aug 18, 2006 11:47 am

Posts
12473

Location
Merseyside, United Kingdom

Favourite OS
Microsoft Windows 7 Ultimate x64
Think what you want but some people like to help and don't want a charge for every little thing they do. If you want to charge, feel free but don't complain if people won't pay you because someone else was nice enough to give it a bash themselves.

Oh, and if the topics in this forum are worthless, go and find somewhere else to ask for people's money.

_________________
Image

BetaArchive Discord: https://discord.gg/epK3r6A


Top  Profile  WWW
 PostPost subject:        Posted: Thu Mar 15, 2007 2:59 am 
Staff
Offline

Joined
Sat Oct 14, 2006 12:05 am

Posts
786
RentedMule if you have nothing good to say, then don't say anything.


Top  Profile
 PostPost subject:        Posted: Sat Mar 17, 2007 12:46 am 
FTP Access
User avatar
Offline

Joined
Sat Mar 17, 2007 2:01 am

Posts
79
So I wrote a script to do this... took an hour or two to get everything working plus some simple statistics and logging. But then I wondered how much effort it would take to support ZIPs as inputs, too. I was a bit surprised to find that the command line RAR doesn't support extracting zips; odd because the GUI does.... And that's when I remembered: WinRAR already has a batch conversion option. :oops:

Tools menu, Convert Archives. :P


Top  Profile
 PostPost subject:        Posted: Sat Mar 17, 2007 1:33 am 
Administrator
User avatar
Offline

Joined
Fri Aug 18, 2006 11:47 am

Posts
12473

Location
Merseyside, United Kingdom

Favourite OS
Microsoft Windows 7 Ultimate x64
rawr,

That is EXCELLENT!!! You are a saviour! :D :D :D Now to try it!

_________________
Image

BetaArchive Discord: https://discord.gg/epK3r6A


Top  Profile  WWW
 PostPost subject:        Posted: Sat Mar 17, 2007 1:58 am 
FTP Access
User avatar
Offline

Joined
Sat Mar 17, 2007 2:01 am

Posts
79
I think you will be pleased with the results :) It's definitely a good idea for saving bandwidth and increasing availability. In my tests, for some files I gained a 35% reduction. Almost half of that came from using enabling "solid" archives, although in some files it didn't help too much. My settings:

1. best compression
2. dictionary size 4096K (this is the default for best compression i think)
3. solid archive


Top  Profile
 PostPost subject:        Posted: Sat Mar 17, 2007 1:59 am 
Administrator
User avatar
Offline

Joined
Fri Aug 18, 2006 11:47 am

Posts
12473

Location
Merseyside, United Kingdom

Favourite OS
Microsoft Windows 7 Ultimate x64
All we need is best compression. That will save space and bandwidth.

_________________
Image

BetaArchive Discord: https://discord.gg/epK3r6A


Top  Profile  WWW
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 19 posts ] 




Who is online

Users browsing this forum: beanboy89 and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to:  

All views expressed in these forums are those of the author and do not necessarily represent the views of the BetaArchive site owner.

Powered by phpBB® Forum Software © phpBB Group

Copyright © 2006-2018

 

Sitemap | XML | RSS