filter question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Guest's Avatar

    filter question

    I'm sorry to post such a newbie question, but does the filter command work in script?
    I have the following script and it's not working:

    LOAD "c:\inetpub\wwwroot"
    filter cutoff:<1days
    COPYTO LEFT Changes\%Date%
  • Guest's Avatar

    #2
    Re: filter question

    It copies everything.

    Comment

    • Chris
      Team Scooter
      • Oct 2007
      • 5538

      #3
      Re: filter question

      The filter statement affects which files are selected by a select statement, so try a select before the copyto command.

      Here's an example:
      Code:
      LOAD "c:\inetpub\wwwroot"
      filter cutoff:<1days
      expand all
      select lt.files
      COPYTO lt Changes\%Date%
      Chris K Scooter Software

      Comment

      • Guest's Avatar

        #4
        Re: filter question

        That worked.
        Thank you!
        For the benefit of other readers, here's the complete script:

        LOAD C:\inetpub\wwwroot C:\Archive\Temp
        FILTER cutoff:<1days
        EXPAND ALL
        SELECT LEFT.FILES
        Option confirm:yes-to-all
        COPY LEFT->RIGHT
        LOAD C:\Archive\Temp
        EXPAND ALL
        SELECT ALL
        # COPYTO can accept a date parameter.
        # In Control Panel, Regional Settings, the Date separater was changed from / to -.
        COPYTO LEFT C:\Archive\Development\Changes\%Date%
        Option confirm:yes-to-all
        # The following deletes the contents of C:\Archive\Temp
        DELETE LEFT

        Comment

        Working...