Sign in to follow this  
Followers 0
StOnge

Script to automatically archive files over 50MB?

3 posts in this topic

Hi. I've searched on these forums for awhile now, and haven't found any threads that answer a question quite like mine. If something like this inquiry has been posted before, then I apologize.

I was wondering if there is a way to write a script that will automatically archive (using WinRAR or WinZip) files in a directory that are over 50MB. For example, have a script scan a folder until it sees a file over 50MB, then launch WinRAR, archive that file, and then continue to scan until it comes across another file greater than 50MB, archive it, etc.

My experience with AutoIT is limited, and this task is beyond my skill with scripting. Any leads or help would be very much appreciated.

Let me know if additional information concerning my question or situation is needed, and I will post it in this thread.

Thank you very much for your time, and thank you in advance for your help.


www.stonge.com

Share this post


Link to post
Share on other sites



Hi. I've searched on these forums for awhile now, and haven't found any threads that answer a question quite like mine. If something like this inquiry has been posted before, then I apologize.

I was wondering if there is a way to write a script that will automatically archive (using WinRAR or WinZip) files in a directory that are over 50MB. For example, have a script scan a folder until it sees a file over 50MB, then launch WinRAR, archive that file, and then continue to scan until it comes across another file greater than 50MB, archive it, etc.

My experience with AutoIT is limited, and this task is beyond my skill with scripting. Any leads or help would be very much appreciated.

Let me know if additional information concerning my question or situation is needed, and I will post it in this thread.

Thank you very much for your time, and thank you in advance for your help.

Hi,

First use Zip udf in pure autoit in exemple script forum and filegetsize

Simple example

if filegetsize("file")>50000 then
archive()
endif

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

Hi,

First use Zip udf in pure autoit in exemple script forum and filegetsize

Simple example

if filegetsize("file")>50000 then
archive()
endif
Does that imply that I know the name of the file? What I would ideally like to do (not sure if this is possible) is have the script scan an entire drive and archive every file over 50MB.

www.stonge.com

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0