Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request? #10

Open
markrholloway opened this issue May 20, 2019 · 4 comments
Open

Feature Request? #10

markrholloway opened this issue May 20, 2019 · 4 comments

Comments

@markrholloway
Copy link

Hi David,

Would it be possible to add the ability to include files in the file groups list (like you do to remove extensions with the ext_to_accept.txt to remove file extensions) or have the ability to include multiple file groups already created within the file screen template? I.e add the file group name to an Include_Group.txt file? This then gets added to the file screen template when re-created?

I ask, as every time the code is run, the file screen templates get removed and re added, which then remove any other file groups or manually added extensions from the file group/or template. A limitation of File Server Resource Manager is that you cant have multiple screen templates on a given share which is a shame if you also want to exclude executable files etc.

I hope that makes some sense?

Thanks in advance,

Mark

@davidande
Copy link
Owner

davidande commented May 20, 2019 via email

@davidande
Copy link
Owner

davidande commented May 20, 2019

You can try this
in the fsrmnocrypto directory add the file ext_to_include.txt
you can edit it by addind the extensions you want to include (1 per line)

in the script add the lines after 165
#Including extension manually from the extension list ext_to_include.txt
$InclExtensions= Get-Content $PSScriptRoot\ext_to_include.txt | ForEach-Object { $.Trim() } | Where-Object {$ -notlike "#*"}
$monitoredExtensions = $monitoredExtensions + $Inclextensions
if (!$InclExtensions) {
Write-Host "Extensions in ext_to_include.txt is empty"
}
else {
Write-Host "Extensions in ext_to_include.txt added : $inclExtensions"
}

test it.
it works for me

@markrholloway
Copy link
Author

Hi David,

Works for me too after editing your code with the following and placing it after line 166...

$InclExtensions= Get-Content $wkdir\ext_to_include.txt | ForEach-Object { $_.Trim() } | Where-Object {$_ -notlike "#*"}
$monitoredExtensions = $monitoredExtensions + $Inclextensions
if (!$InclExtensions) {
Write-Host "Extensions in ext_to_include.txt is empty"
}
else {
Write-Host "Extensions in ext_to_include.txt added : $inclExtensions"
}

Many thanks again,

Mark

@davidande
Copy link
Owner

Great
$PSScriptRoot should work too
fot that, You need to replace all $wkdir with $PSScriptRoot
after that $kdit is not used anymore
:-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants