Closing the path to any subfolder

Discussion in 'Sandboxie (SBIE Open Source) Plus & Classic' started by Mr.X, Jul 1, 2023.

  1. Mr.X

    Mr.X Registered Member

    In a red box:

    How to write the correct syntax for the following line to open file access to Desktop folder but at the same time close the paths to any subfolder:
    Code:
    OpenFilePath=D:\Desktop
    
     
  2. busy

    busy Registered Member

    Code:
    OpenFilePath=D:\Desktop\
    ClosedFilePath=D:\Desktop\*\*
     
    Last edited: Jul 2, 2023
  3. Mr.X

    Mr.X Registered Member

  4. Mr.X

    Mr.X Registered Member

    Based on this configuration
    Code:
    OpenFilePath=D:\Desktop\
    ClosedFilePath=D:\Desktop\*\*
    
    Is the following line possible to use to only read the contents (lots of subfolders and files after the asterisk symbol)?
    Code:
    NormalFilePath=D:\Desktop\FolderA\FolderB\FolderC\*
    
     
  5. DavidXanatos

    DavidXanatos Developer

    yea should work and remember to enable rule specificity
     
  6. Mr.X

    Mr.X Registered Member

    Well, it didn't work. Opening of FolderA is blocked as per rule ClosedFilePath=D:\Desktop\*\*
    Code:
    OpenFilePath=D:\Desktop\
    ClosedFilePath=D:\Desktop\*\*
    NormalFilePath=D:\Desktop\FolderA\FolderB\FolderC\*
    UseRuleSpecificity=y
    
     
  7. DavidXanatos

    DavidXanatos Developer

    how did you test it?
    also try replacing ClosedFilePath with WriteFilePath
     
  8. Mr.X

    Mr.X Registered Member

    I run a chrome profile (chrome installed not portable) > click on Search by image > upload a file > File explorer is blocked when I attempt to open FolderA
    Same thing.
    Code:
    OpenFilePath=D:\Desktop\
    ClosedFilePath=D:\Desktop\*\*
    WriteFilePath=D:\Desktop\FolderA\FolderB\FolderC\*
    UseRuleSpecificity=y
    
     
    Last edited: Jul 2, 2023
  9. busy

    busy Registered Member

    @Mr.X Try this:

    Code:
    UseRuleSpecificity=y
    WriteFilePath=D:\
    OpenFilePath=D:\Desktop\
    WriteFilePath=D:\Desktop\*\*
    NormalFilePath=|D:\Desktop\FolderA\
    WriteFilePath=D:\Desktop\FolderA\
    NormalFilePath=|D:\Desktop\FolderA\FolderB\
    WriteFilePath=D:\Desktop\FolderA\FolderB\
    NormalFilePath=|D:\Desktop\FolderA\FolderB\FolderC\
    NormalFilePath=D:\Desktop\FolderA\FolderB\FolderC\
     
  10. Mr.X

    Mr.X Registered Member

    You're a genius @busy , it worked out perfectly :thumb::)
    Would you care to explain all you did here so I can hopefully use those lines in other scenarios?
    Thanks a lot, in advance.

    PS: I don't want to seem ungrateful @busy , believe me, I am not. It's just I think there are too many lines one have to write down just to get access to only four subfolders starting from the drive's root.

    @DavidXanatos
    Do you think a solution is possible?
     
  11. DjKilla

    DjKilla Registered Member

    I'm always fascinated at how busy works his magic. Is there some place that explains what these commands/rules do? Like 'UseRuleSpecificity' and what the pipes do.
     
  12. Mr.X

    Mr.X Registered Member

    @DavidXanatos
    Do you think a solution is possible?
    I mean a fix to use just one line instead of multiple lines.
    The line might have different symbols for different functions.
     
  13. DavidXanatos

    DavidXanatos Developer

    I'll look into it, one line certainly not but ideally we could be able to achieve that in 2 lines, although it may require som fixing lets see...
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice