How to use filters to exclude some subdirectories?

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

    How to use filters to exclude some subdirectories?

    Hello,
    I have to replicate a folder and his subfolders except 2 of them. How can i do this? The following script that i actually use doesn't work. It 's still replicate those 2 folders: dsk_sys\DServer\DFolder\Rep\;dsk_sys\DServer\DFold er\log\

    filter -~*.*;-dsk_sys\DServer\DFolder\Rep\;-dsk_sys\DServer\DFolder\log\;-"Recycle bin\";-"System Volume Information"
    load d:\%LeftPart% %Drive%\%RightPart%
    criteria timestamp
    expand all
    select lt.newer lt.orphan lt.empty.folders
    option confirm:yes-to-all
    folder-report layout:summary options:display-left-newer-orphans output-to:"%LogPath%\%Report%" output-options=html-color
    copy lt->rt

    Could you please help me?

    Thanks a lot.
  • Chris
    Team Scooter
    • Oct 2007
    • 5538

    #2
    Re: How to use filters to exclude some subdirector

    Change the line

    select lt.newer lt.orphan lt.empty.folders

    to

    select lt.newer.files lt.orphan.files

    and it should work correctly.

    Filters only filter files and folders from the display. If you select a folder it will copy the entire folder, including things within that folder that are filtered out of the display. If you want to copy only files that aren't filtered out, you should select only files using the .files qualifier in a select command.
    Chris K Scooter Software

    Comment

    Working...