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

RE: [BATCH WORLD] Batch file to delete the files 7 days older tha n n n current date

Expand Messages
  • Morris, Lamar
    Worked great, thanks. Question, can you put more than one exclusion in the script. Example rn this one first type d: log.txt|find /v /i _protect d: kill.bat
    Message 1 of 15 , Aug 6, 2003
    • 0 Attachment
      Worked great, thanks. Question, can you put more than one exclusion in the
      script.

      Example rn this one first type d:\log.txt|find /v /i "_protect">d:\kill.bat

      Then this and append to the bat file type d:\log.txt|find /v /i
      "-protect">>d:\kill.bat



      Lamar



      -----Original Message-----
      From: Michael Marquart [mailto:micm@...]
      Sent: Wednesday, August 06, 2003 9:30 AM
      To: batchworld@yahoogroups.com
      Subject: Re: [BATCH WORLD] Batch file to delete the files 7 days older tha n
      n n current date



      On Wed, 6 Aug 2003 09:27:29 -0500, Morris, Lamar wrote:

      > Once again I didn't analyze the script too closely. I looked at the log
      file
      > before the script was finished and saw all the _protect directories
      listed.
      >
      > If I had read the script I would have seen that the removal part runs
      after
      > the log file is finished. Let me start It over and see what happens. I
      > tested it on my machine and it worked. I was doing a test run on the big
      > directory which will take a long time to run.
      >

      Understood. Let me know how it goes, and thanks for your kind words
      earlier. Much appreciated.


      --
      Regards,
      Michael





      Yahoo! Groups Sponsor



      ADVERTISEMENT

      <http://rd.yahoo.com/M=251812.3170658.4537139.1261774/D=egroupweb/S=17072085
      79:HM/A=1693353/R=0/SIG=11t71ok4g/*http:/www.netflix.com/Default?mqso=601782
      94&partid=3170658> click here



      <http://us.adserver.yahoo.com/l?M=251812.3170658.4537139.1261774/D=egroupmai
      l/S=:HM/A=1693353/rand=361858619>


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

      To Unsubscribe, send a blank message to: batchworld-unsubscribe@...

      Your use of Yahoo! Groups is subject to the Yahoo!
      <http://docs.yahoo.com/info/terms/> Terms of Service.



      [Non-text portions of this message have been removed]
    • Morris, Lamar
      Never mind that won t work, unless I copy kill.bat back to log.txt then run the command and write it to another batch file, but then the log.txt would be open
      Message 2 of 15 , Aug 6, 2003
      • 0 Attachment
        Never mind that won't work, unless I copy kill.bat back to log.txt then run
        the command and write it to another batch file, but then the log.txt would
        be open and probably couldn't write to it.



        Lamar



        -----Original Message-----
        From: Morris, Lamar
        Sent: Wednesday, August 06, 2003 2:39 PM
        To: 'batchworld@yahoogroups.com'
        Subject: RE: [BATCH WORLD] Batch file to delete the files 7 days older tha n
        n n current date



        Worked great, thanks. Question, can you put more than one exclusion in the
        script.

        Example rn this one first type d:\log.txt|find /v /i "_protect">d:\kill.bat

        Then this and append to the bat file type d:\log.txt|find /v /i
        "-protect">>d:\kill.bat



        Lamar



        -----Original Message-----
        From: Michael Marquart [mailto:micm@...]
        Sent: Wednesday, August 06, 2003 9:30 AM
        To: batchworld@yahoogroups.com
        Subject: Re: [BATCH WORLD] Batch file to delete the files 7 days older tha n
        n n current date



        On Wed, 6 Aug 2003 09:27:29 -0500, Morris, Lamar wrote:

        > Once again I didn't analyze the script too closely. I looked at the log
        file
        > before the script was finished and saw all the _protect directories
        listed.
        >
        > If I had read the script I would have seen that the removal part runs
        after
        > the log file is finished. Let me start It over and see what happens. I
        > tested it on my machine and it worked. I was doing a test run on the big
        > directory which will take a long time to run.
        >

        Understood. Let me know how it goes, and thanks for your kind words
        earlier. Much appreciated.


        --
        Regards,
        Michael





        Yahoo! Groups Sponsor



        ADVERTISEMENT

        <http://rd.yahoo.com/M=251812.3170658.4537139.1261774/D=egroupweb/S=17072085
        <http://rd.yahoo.com/M=251812.3170658.4537139.1261774/D=egroupweb/S=17072085
        >
        79:HM/A=1693353/R=0/SIG=11t71ok4g/*http:/www.netflix.com/Default?mqso=601782
        94&partid=3170658> click here



        <http://us.adserver.yahoo.com/l?M=251812.3170658.4537139.1261774/D=egroupmai
        <http://us.adserver.yahoo.com/l?M=251812.3170658.4537139.1261774/D=egroupmai
        >
        l/S=:HM/A=1693353/rand=361858619>


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

        To Unsubscribe, send a blank message to: batchworld-unsubscribe@...

        Your use of Yahoo! Groups is subject to the Yahoo!
        <http://docs.yahoo.com/info/terms/ <http://docs.yahoo.com/info/terms/> >
        Terms of Service.



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






        Yahoo! Groups Sponsor



        ADVERTISEMENT

        <http://rd.yahoo.com/M=245454.3656312.4921743.1261774/D=egroupweb/S=17072085
        79:HM/A=1457554/R=0/SIG=11c6fnta2/*http:/ipunda.com/clk/beibunmaisuiyuiwabei
        >



        <http://us.adserver.yahoo.com/l?M=245454.3656312.4921743.1261774/D=egroupmai
        l/S=:HM/A=1457554/rand=758891048>


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

        To Unsubscribe, send a blank message to: batchworld-unsubscribe@...

        Your use of Yahoo! Groups is subject to the Yahoo!
        <http://docs.yahoo.com/info/terms/> Terms of Service.



        [Non-text portions of this message have been removed]
      • Michael Marquart
        ... Pipe it through a second instance of find d: log.txt|find /v/i _protect |find /v/i -protect d: kill.bat or add an extra line d: log.txt|find /v /i
        Message 3 of 15 , Aug 6, 2003
        • 0 Attachment
          On Wed, 6 Aug 2003 14:38:41 -0500, Morris, Lamar wrote:

          > Worked great, thanks. Question, can you put more than one exclusion in the
          > script.
          >
          > Example rn this one first type d:\log.txt|find /v /i "_protect">d:\kill.bat
          >
          > Then this and append to the bat file type d:\log.txt|find /v /i "-protect">>d:\kill.bat

          Pipe it through a second instance of find

          d:\log.txt|find /v/i "_protect"|find /v/i "-protect">d:\kill.bat


          or add an extra line

          d:\log.txt|find /v /i "_protect">d:\kill.bat
          d:\kill.bat|find /v /i "-protect">d:\kill.bat

          The second line can use the same filename because the pipe causes the OS to
          open the file, read it, and then close it again, before proceeding with
          the portion after the pipe. In Win9x/ME it creates a temporary file on the
          HDD with the info and in NT I believe it's all done in memory.

          --
          Regards,
          Michael
        Your message has been successfully submitted and would be delivered to recipients shortly.