Activity Stream
48,167 MEMBERS
6934 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Page 1 of 3 123 LastLast
Results 1 to 10 of 28
  1.     
    #1
    Member
    Website's:
    facebook.com

    Talking How to Auto RaR Files

    Hello KWWH!

    I recently saw a new thread asking about how to rar files automatically

    So I decided to make a little tutorial that may help many, hope it does:

    My technique uses a BATCH script I made and a scheduled task involving this BATCH file.

    So first open up notepad or your favorite text editor

    Type the following:



    @ECHO OFF

    cd C:\directory_with_files_you_want_to_compress

    SET PATH=C:;C:\Program Files (x86)\WinRAR;C:\Windows\system32;C:\Windows;C:\Win dows\System32\Wbem;%PATH%

    FOR /f "delims=" %%d IN ('DIR /B') DO WinRAR a -m0 -ep -df "C:\where_you_want_to_save_new_rar_files\%%~nxd.ra r" "%%~fd"

    EXIT

    Save this as AutoRaR.bat (or whatever you want) and save it where you want

    So the first path ?C:\directory_you_want_to_compress? is the directory where the files you want to compress are located

    SET PATH looks for rar.exe to run in command prompt
    DO NOT EDIT THIS

    DO WinRar executes winrar
    -m0 is the compression level, where compresion level (0-store...3-default ...5-maximal) you can set which ever you want

    -ep excludes the path from the created rar name (You can remove if you want to include path)

    -df deletes the original files in the main directory you set first ?C:\directory_you_want_to_compress?
    You can remove this if you want to maintain the files and remove manually later

    Example:



    Now create a new scheduled task to run AutoRaR.bat for example hourly, daily, weekly or whatever your needs

    To create a new scheduled task go Start>All Programs>Accessories>System Tools>Task Scheduler and from here follow the wizard

    Thats it Folks! Hope I helped!

    Enjoy
    cotufa-ssdd

    NOTE: Please test before using on your original files

    ::EDIT::

    I added suggestions tha KWWH members have requested to the primary post:



    EXCLUDE RAR FILES FROM RE-COMPRESSION:

    @ECHO OFF

    cd C:\directory_with_files_you_want_to_compress

    SET PATH=C:;C:\Program Files (x86)\WinRAR;C:\Windows\system32;C:\Windows;C:\Win dows\System32\Wbem;%PATH%

    FOR /f "delims=" %%d IN ('DIR /B') DO WinRAR a -m0 -ep -df -x*.rar "C:\where_you_want_to_save_new_rar_files\%%~nxd.ra r" "%%~fd"

    move /-y "C:\directory_with_files_you_want_to_compress\*.ra r" "C:\where_you_want_to_save_new_rar_files\"
    EXIT
    Where -x*.rar means ?exclude all .rar files?. You can add more files to exclude for example add another -x*.zip

    Since you excluded all rar files, they will stay in the original directory, thats what the next code does, move, this is simply moving all .rar files to the same directory where the compressions are being made.



    COMPRESS IN MULTIVOLUMES:

    Edit this line:

    FOR /f "delims=" %%d IN ('DIR /B') DO WinRAR a -m0 -ep -df -x*.rar -v100m "C:\where_you_want_to_save_new_rar_files\%%~nxd.ra r" "%%~fd"
    -v100m will save multivolumes of 100m. Or change to whatever you need..



    ADD README, INSTRUCTION OR ANY ?BASE? FILE TO ALL COMPRESSIONS:

    @ECHO OFF

    for /D %%f in ("C:\directory_with_files_you_want_to_compress\ *") do copy "C:\directory_with_readme.txt\readme.txt" "%%f\"

    cd C:\directory_with_files_you_want_to_compress

    SET PATH=C:;C:\Program Files (x86)\WinRAR;C:\Windows\system32;C:\Windows;C:\Win dows\System32\Wbem;%PATH%

    FOR /f "delims=" %%d IN ('DIR /B') DO WinRAR a -m0 -ep -df -v100m -x*.rar "C:\where_you_want_to_save_new_rar_files\%%~nxd.ra r" "%%~fd"

    EXIT
    This new line will add the readme.txt to all original folders before compression. It then moves on to compress each folder to the specifications discussed earlier.

    Notice that the readme.txt is located in a diferent directory, that is so it will not be compressed and removed.



    UNRAR PASSWORDED FILES:

    ECHO OFF

    cd C:\PATH TO RARS

    SET PATH=C:;C:\Program Files (x86)\WinRAR;C:\Windows\system32;C:\Windows;C:\Win dows\System32\Wbem;%PATH%

    FOR /f "delims=" %%d IN ('DIR /B') DO unRaR e -p123456 *.rar C:\DESTINATION TO EXTRACT

    EXIT
    123456 is the password and it is the same password for *all rars.

    Enjoy
    cotufa-ssdd

    NOTE: Please test before using on your original files
    cotufa-ssdd Reviewed by cotufa-ssdd on . How to Auto RaR Files Hello KWWH! I recently saw a new thread asking about how to rar files automatically So I decided to make a little tutorial that may help many, hope it does: My technique uses a BATCH script I made and a scheduled task involving this BATCH file. So first open up notepad or your favorite text editor Rating: 5
    All right everyone, line up alphabetically according to your height.

  2.   Sponsored Links

  3.     
    #2
    Banned
    Wow, Useful.

  4.     
    #3
    Member
    Website's:
    YourVPNList.blinkweb.com
    That is A Great IDEA bro thanks for Info

  5.     
    #4
    Member
    great...
    but when i open bat file it will put all files into one rar file instead of individual rar

    on windows server 2008 with winrar 4.11 x64bit

    any solution????

  6.     
    #5
    Member
    Website's:
    facebook.com
    this will RaR them individually...for one file you will need to modify some lines in the script, but very simple if you need to...
    All right everyone, line up alphabetically according to your height.

  7.     
    #6
    Member
    thank you so much.....gonna give it a try....

  8.     
    #7
    Member
    Website's:
    facebook.com
    you are welcome, please let me know if it does any good...

    this is a very simple script that can be modified to do more if you wanted to... you can run rar.exe in cmd to view more options you can add...
    All right everyone, line up alphabetically according to your height.

  9.     
    #8
    Member
    bro i want individual rar file but in windows server 2008 it is adding all files in dat folder in to one single rar file any solution ??

  10.     
    #9
    Member
    Website's:
    facebook.com
    i just tested it and it saves in individual files... please check this line:

    FOR /f "delims=" %%d IN ('DIR /B') DO WinRAR a -m0 -ep -df "C:\where_you_want_to_save_new_rar_files\%%~nxd.rar" "%%~fd"
    %%~nxd.ra r this part must be included, this is basically saying to save each file using there original name .rar

    if you use:

    FOR /f "delims=" %%d IN ('DIR /B') DO WinRAR a -m0 -ep -df "C:\where_you_want_to_save_new_rar_files\" "%%~fd"
    it will save all files as ?.rar? without a name

    if you use:

    FOR /f "delims=" %%d IN ('DIR /B') DO WinRAR a -m0 -ep -df "C:\where_you_want_to_save_new_rar_files\backup.ra r" "%%~fd"
    it will save all files in one rar called ?backup.rar?

    hope its clear

    note: there should be no space in ?.rar? for some reason KWWH is leaving a space making it ?.ra r?
    All right everyone, line up alphabetically according to your height.

  11.     
    #10
    Member
    Thanks bro.. it works !

    great idea...i must say...

Page 1 of 3 123 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [Selling] Wautoposter Fully Automated Bot Script RSS FEED Auto Download Auto Upload
    By jpavsex in forum Completed Transactions
    Replies: 302
    Last Post: 10th Jul 2011, 09:30 AM
  2. [Selling] Wautoposter Automated Uploading Script Auto Download Auto Upload $9/month
    By jpavsex in forum Completed Transactions
    Replies: 83
    Last Post: 3rd Jul 2011, 05:06 AM
  3. [Buying] Auto Download Auto Upload Auto Post
    By arkinyildiz in forum Completed Transactions
    Replies: 20
    Last Post: 7th May 2011, 03:28 PM
  4. Need php cronjob to auto dlete files after XX hours [$5]
    By kohkindachi in forum Technical Help Desk Support
    Replies: 13
    Last Post: 16th Sep 2010, 04:24 AM

Tags for this Thread

BE SOCIAL