BC 2.5.3 Problem mit Dateifilter

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pit
    New User
    • Feb 2009
    • 2

    BC 2.5.3 Problem mit Dateifilter

    Hallo,

    ich mache gerade meine ersten Versuche mit BC Scripts (BC 2.5.3), und
    habe folgendes Problem (es sollen alle Dateien gesichert werden, außer
    *.exe):

    Test-Script:

    option confirm:yes-to-all
    load H:\develop\BCtest F:\Backup\H\develop\BCtest
    filter "-*.exe"
    expand all
    select lt.newer.files lt.orphan
    folder-report layout:side-by-side options:display-left-newer-orphans output-to:"I:\temp\testrep.txt"
    copy lt->rt
    select rt.orphan
    delete rt

    H:\develop\BCtest
    --some_other_files.xxx
    --test.exe nicht kopiert, ok
    --FolderA1
    ----test.exe nicht kopiert, ok
    ----FolderA2
    ------test.exe nicht kopiert, ok
    ------FolderA3
    --------test.exe trotz Filter kopiert
    --FolderB1
    ----test.exe nicht kopiert, ok
    ----FolderB2
    ------test.exe trotz Filter kopiert
    --FolderC1
    ----test.exe trotz Filter kopiert

    Es scheint so, als wäre der Filter auf dem jeweils untersten Level eines
    Zweigs nicht aktiv. Die kopierten exes werden ausserdem nicht im Report
    aufgeführt.

    Gruß, Peter


    Edit: Zusätzliche Information

    Ich habe herausgefunden, dass der beschriebene Fehler offensichtlich nur
    auftritt, wenn das entsprechende unterste Verzeichnis nur diese eine Datei
    enthält, also:

    H:\develop\BCtest
    --test.exe nicht kopiert, ok
    --FolderA1
    ----test.exe nicht kopiert, ok
    ----FolderA2
    ------test.exe trotz Filter kopiert
    --FolderB1
    ----test.exe nicht kopiert, ok
    ----FolderB2
    ------another.txt kopiert, ok
    ------test.exe nicht kopiert, ok

    Kann das jemand nachvollziehen?

    Gruß, Peter
    Last edited by pit; 04-Feb-2009, 09:35 AM. Reason: Zusätzliche Information
  • Aaron
    Team Scooter
    • Oct 2007
    • 16002

    #2
    Hello,

    Your script looks good, except for one small thing.

    If your selection selects a folder, then it will copy all files in the folder. Change lt.orphans to lt.orphans.files to make sure you do not select an orphan folder.

    Does that help with your problem?

    In BC3, we changed this behavior so filters are used, even if the folder is selected.

    ==================
    Hallo,

    Dein Skript sieht gut aus, abgesehen von einer kleinen Sache.

    Wenn Deine Auswahl einen Ordner auswählt, dann wird es alle Dateien des Ordners kopieren. Ändere lt.orphans in lt.orphans.files, um sicherzustellen, dass Du keinen Ordner-Single (Orphan) auswählst.

    War dies schon hilfreich für das Problem?

    In BC3 haben wir dieses Verhalten geändert, so dass Filter verwendet werden, auch wenn der Ordner ausgewählt ist.
    Last edited by Gunnar; 06-Feb-2009, 10:53 AM.
    Aaron P Scooter Software

    Comment

    • pit
      New User
      • Feb 2009
      • 2

      #3
      Hello, Aaron,

      thanks for your reply. A quick test shows that it seems to work now as
      expected.

      I do not really understand the logic, because the exe file is only copied
      from the "lowest" folder, and if it's the only file in that folder. If there
      is at least one other file or folder, which is not filtered out, the filter
      works.

      By the way, I took the syntax for my test script from the (german) BC
      help file.

      Again, thanks a lot,

      Best regards,

      Peter

      Comment

      Working...