Command line archiving (i.e., WinRAR)?

Discussion in 'Computer Support' started by fitwell, Jul 13, 2004.

  1. fitwell

    fitwell Guest

    Asking for help from anyone that has successfully used the command
    line RAR.EXE that comes with WinRAR <g>.

    I've been able to get this to work in Windows RUN:

    C:\PROGRA~1\ZIP\WINRAR~1.00B\RAR.EXE a
    "D:\0-PROG~1\0-ZIPP~1.2(F\BACKUP~2\Backup- .zip"
    C:\PROGRA~1\DIARY\DIARYV~1.2\DATA\*.*

    (It backs up my journal program files.)

    Only problem is that I get a folder structure in the zip file whereas
    I need _just_ the files themselves archived.

    Anyone know how to get just the files themselves archived, pls?

    Thank you.
    fitwell, Jul 13, 2004
    #1
    1. Advertising

  2. fitwell

    °Mike° Guest

    Don't do it from the Run box. Open a Command Prompt
    window or use a batch file. In the Command Prompt
    scenario, CD to the folder that stores your journal
    files. Eg:

    cd\
    cd c:\progra~1\diary\diaryv~1.2\data
    ;
    ; Add WinRAR to the PATH -- makes it simpler
    ; if you want to keep the Command Prompt
    ; window open, and just use the simple rar
    ; command, without having to prefix the
    ; complete path.
    ;
    PATH=%PATH%;c:\progra~1\zip\winrar~1.00b
    ;
    ; Archive the files -- I shall use a backup folder
    ; d:\temp as an example, to keep it simple.
    ;
    rar a d:\temp\backup.rar *.*

    -----

    In the batch file scenario (example d:\temp backup
    folder used again):

    @ECHO OFF
    CD\
    CD c:\progra~1\diary\diaryv~1.2\data
    c:\progra~1\zip\winrar~1.00b\rar a d:\temp\backup.rar *.*



    On Tue, 13 Jul 2004 08:27:51 GMT, in
    <>
    fitwell scrawled:

    >Asking for help from anyone that has successfully used the command
    >line RAR.EXE that comes with WinRAR <g>.
    >
    >I've been able to get this to work in Windows RUN:
    >
    >C:\PROGRA~1\ZIP\WINRAR~1.00B\RAR.EXE a
    >"D:\0-PROG~1\0-ZIPP~1.2(F\BACKUP~2\Backup- .zip"
    >C:\PROGRA~1\DIARY\DIARYV~1.2\DATA\*.*
    >
    >(It backs up my journal program files.)
    >
    >Only problem is that I get a folder structure in the zip file whereas
    >I need _just_ the files themselves archived.
    >
    >Anyone know how to get just the files themselves archived, pls?
    >
    >Thank you.


    --
    Basic computer maintenance
    http://uk.geocities.com/personel44/maintenance.html
    °Mike°, Jul 13, 2004
    #2
    1. Advertising

  3. fitwell

    inhahe

    Joined:
    Mar 2, 2007
    Messages:
    1
    i think you're actually creating a .rar file there, not a .zip file. winrar just recognizes it as a .rar when you open it with winrar even though it's named with a .zip extension.
    inhahe, Aug 28, 2009
    #3
  4. fitwell

    manikp

    Joined:
    Feb 10, 2011
    Messages:
    1
    You can use the -ep option to include the specified files.

    C:\PROGRA~1\ZIP\WINRAR~1.00B\RAR.EXE a
    -ep "D:\0-PROG~1\0-ZIPP~1.2(F\BACKUP~2\Backup- .zip"
    C:\PROGRA~1\DIARY\DIARYV~1.2\DATA\*.*
    manikp, Feb 10, 2011
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gabe

    Winrar / archiving question

    Gabe, Nov 30, 2003, in forum: Computer Support
    Replies:
    1
    Views:
    395
  2. AF

    WinRAR Command Line Help

    AF, Nov 6, 2006, in forum: Computer Support
    Replies:
    1
    Views:
    6,795
  3. chuckcar
    Replies:
    11
    Views:
    9,420
    §ñühw¤£f
    Apr 21, 2009
  4. Evan Platt
    Replies:
    1
    Views:
    859
    John Holmes
    Apr 18, 2009
  5. Colby_

    Using WinRAR command line utility

    Colby_, Mar 10, 2010, in forum: Computer Support
    Replies:
    0
    Views:
    3,636
    Colby_
    Mar 10, 2010
Loading...

Share This Page