Loading ...
Sorry, an error occurred while loading the content.

batch file

Expand Messages
  • alex
    hello all does anyone have a batch file that i can use the batch file should be able to zip and password protect the file. any help would be greatly
    Message 1 of 12 , Oct 3, 2011
    • 0 Attachment
      hello all

      does anyone have a batch file that i can use the batch file should be able to zip and password protect the file.

      any help would be greatly appreciated

      thanks

      alex
    • foxidrive
      ... @echo off pkzip -n+ -exxm -whs -smypassword %~1 %~2 Launch it like zippw.bat my secret stash.zip all my secrets.txt and the password will be
      Message 2 of 12 , Oct 3, 2011
      • 0 Attachment
        On 4/10/2011 04:26, alex wrote:
        > hello all
        >
        > does anyone have a batch file that i can use the batch file should be able to zip and password protect the file.
        >
        > any help would be greatly appreciated
        >
        > thanks
        >
        > alex


        @echo off
        pkzip -n+ -exxm -whs -smypassword "%~1" "%~2"



        Launch it like

        zippw.bat "my secret stash.zip" "all my secrets.txt"


        and the password will be mypassword
      • Parag Doke
        I do not think this is doable in native batch/cmd itself. But if you are willing to use freeware (such as 7zip), then such tools have command line utilities to
        Message 3 of 12 , Oct 3, 2011
        • 0 Attachment
          I do not think this is doable in native batch/cmd itself.
          But if you are willing to use freeware (such as 7zip), then such tools have
          command line utilities to create zip files. Here is an example:
          http://www.dotnetperls.com/7-zip-examples

          Parag Doke
          Save paper, save trees. Do not print emails/documents unless absolutely
          necessary.


          On Mon, Oct 3, 2011 at 10:56 PM, alex <alex.alexandre@...> wrote:

          > **
          >
          >
          > hello all
          >
          > does anyone have a batch file that i can use the batch file should be able
          > to zip and password protect the file.
          >
          > any help would be greatly appreciated
          >
          > thanks
          >
          > alex
          >
          >
          >


          [Non-text portions of this message have been removed]
        • Alex Alexandre
          This is what I have so far cd C: FTP-JOBS FTP-STATEMENT cd C: Program Files WinZip WINZIP32.EXE -s bscustmt C: FTP-JOBS FTP-STATEMENT BADADDR_LIST.zip
          Message 4 of 12 , Oct 3, 2011
          • 0 Attachment
            This is what I have so far

            cd C:\FTP-JOBS\FTP-STATEMENT\
            cd C:\Program Files\WinZip\
            WINZIP32.EXE -s bscustmt C:\FTP-JOBS\FTP-STATEMENT\BADADDR_LIST.zip C:\FTP-JOBS\FTP-STATEMENT\BADADDR_LIST
            WINZIP32.EXE -s bscustmt C:\FTP-JOBS\FTP-STATEMENT\EMPLOYEE_LIST.zip C:\FTP-JOBS\FTP-STATEMENT\EMPLOYEE_LIST
            WINZIP32.EXE -s bscustmt C:\FTP-JOBS\FTP-STATEMENT\RSTATPRA.zip C:\FTP-JOBS\FTP-STATEMENT\RSTATPR*
            WINZIP32.EXE s bscustmt C:\FTP-JOBS\FTP-STATEMENT\RSTACOMM.zip C:\FTP-JOBS\FTP-STATEMENT\RSTACOMM
            pause
            -----Original Message-----
            From: batchworld@yahoogroups.com [mailto:batchworld@yahoogroups.com] On Behalf Of Parag Doke
            Sent: Monday, October 03, 2011 1:50 PM
            To: batchworld@yahoogroups.com
            Subject: Re: [BATCH WORLD] batch file

            I do not think this is doable in native batch/cmd itself.
            But if you are willing to use freeware (such as 7zip), then such tools have
            command line utilities to create zip files. Here is an example:
            http://www.dotnetperls.com/7-zip-examples

            Parag Doke
            Save paper, save trees. Do not print emails/documents unless absolutely
            necessary.


            On Mon, Oct 3, 2011 at 10:56 PM, alex <alex.alexandre@...> wrote:

            > **
            >
            >
            > hello all
            >
            > does anyone have a batch file that i can use the batch file should be able
            > to zip and password protect the file.
            >
            > any help would be greatly appreciated
            >
            > thanks
            >
            > alex
            >
            >
            >


            [Non-text portions of this message have been removed]



            ------------------------------------

            To Post a message, send it to: batchworld@...

            To Unsubscribe, send a blank message to: batchworld-unsubscribe@...! Groups Links
          • Alex Alexandre
            Hello I am trying to use winzip This is what I have so far cd C: FTP-JOBS FTP-STATEMENT cd C: Program Files WinZip WINZIP32.EXE -s bscustmt
            Message 5 of 12 , Oct 3, 2011
            • 0 Attachment
              Hello I am trying to use winzip

              This is what I have so far


              cd C:\FTP-JOBS\FTP-STATEMENT\
              cd C:\Program Files\WinZip\
              WINZIP32.EXE -s bscustmt C:\FTP-JOBS\FTP-STATEMENT\BADADDR_LIST.zip C:\FTP-JOBS\FTP-STATEMENT\BADADDR_LIST
              WINZIP32.EXE -s bscustmt C:\FTP-JOBS\FTP-STATEMENT\EMPLOYEE_LIST.zip C:\FTP-JOBS\FTP-STATEMENT\EMPLOYEE_LIST
              WINZIP32.EXE -s bscustmt C:\FTP-JOBS\FTP-STATEMENT\RSTATPRA.zip C:\FTP-JOBS\FTP-STATEMENT\RSTATPR*
              WINZIP32.EXE s bscustmt C:\FTP-JOBS\FTP-STATEMENT\RSTACOMM.zip C:\FTP-JOBS\FTP-STATEMENT\RSTACOMM
              pause
              From: batchworld@yahoogroups.com<mailto:batchworld@yahoogroups.com> [mailto:batchworld@yahoogroups.com]<mailto:[mailto:batchworld@yahoogroups.com]> On Behalf Of foxidrive
              Sent: Monday, October 03, 2011 1:46 PM
              To: batchworld@yahoogroups.com<mailto:batchworld@yahoogroups.com>
              Subject: Re: [BATCH WORLD] batch file



              On 4/10/2011 04:26, alex wrote:
              > hello all
              >
              > does anyone have a batch file that i can use the batch file should be able to zip and password protect the file.
              >
              > any help would be greatly appreciated
              >
              > thanks
              >
              > alex

              @echo off
              pkzip -n+ -exxm -whs -smypassword "%~1" "%~2"

              Launch it like

              zippw.bat "my secret stash.zip" "all my secrets.txt"

              and the password will be mypassword



              [Non-text portions of this message have been removed]
            • foxidrive
              ... I think this may work. I don t have winzip to test it with. Your target filespecs might need some work. @echo off setlocal set
              Message 6 of 12 , Oct 3, 2011
              • 0 Attachment
                On 4/10/2011 05:07, Alex Alexandre wrote:
                > This is what I have so far
                >
                > cd C:\FTP-JOBS\FTP-STATEMENT\
                > cd C:\Program Files\WinZip\
                > WINZIP32.EXE -s bscustmt C:\FTP-JOBS\FTP-STATEMENT\BADADDR_LIST.zip C:\FTP-JOBS\FTP-STATEMENT\BADADDR_LIST
                > WINZIP32.EXE -s bscustmt C:\FTP-JOBS\FTP-STATEMENT\EMPLOYEE_LIST.zip C:\FTP-JOBS\FTP-STATEMENT\EMPLOYEE_LIST
                > WINZIP32.EXE -s bscustmt C:\FTP-JOBS\FTP-STATEMENT\RSTATPRA.zip C:\FTP-JOBS\FTP-STATEMENT\RSTATPR*
                > WINZIP32.EXE s bscustmt C:\FTP-JOBS\FTP-STATEMENT\RSTACOMM.zip C:\FTP-JOBS\FTP-STATEMENT\RSTACOMM
                > pause


                I think this may work. I don't have winzip to test it with.
                Your target filespecs might need some work.

                @echo off
                setlocal
                set "folder=C:\FTP-JOBS\FTP-STATEMENT"
                set "wz=C:\Program Files\WinZip\WINZIP32.EXE"

                "%wz%" -a -sbscustmt "%folder%\BADADDR_LIST.zip" "%folder%\BADADDR_LIST"
                "%wz%" -a -sbscustmt "%folder%\EMPLOYEE_LIST.zip" "%folder%\EMPLOYEE_LIST"
                "%wz%" -a -sbscustmt "%folder%\RSTATPRA.zip" "%folder%\RSTATPR*"
                "%wz%" -a -sbscustmt "%folder%\RSTACOMM.zip" "%folder%\RSTACOMM"
              • Zaidy036
                If you password protect using a batch that means anyone who sees the batch can read your password. The following is what I do at the beginning of my zip-backup
                Message 7 of 12 , Oct 4, 2011
                • 0 Attachment
                  If you password protect using a batch that means anyone who sees the batch
                  can read your password.

                  The following is what I do at the beginning of my zip-backup file to protect
                  against this (I use 7Zip):
                  -------------------------------------------
                  @ECHO off

                  : Get Password
                  : ===============================
                  :RESTART
                  SET /P pw=Enter Password for ZIP Files
                  ECHO.
                  ECHO You entered %pw%
                  ECHO.
                  SET /P ans=Press "y" if correct
                  ECHO.
                  IF %ans%==y GOTO DOIT
                  SET ans=
                  GOTO RESTART

                  :DOIT
                  -----------------------------------------------------


                  [Non-text portions of this message have been removed]
                Your message has been successfully submitted and would be delivered to recipients shortly.