Forked from drkdelaney/.drive_global_blacklist.filter
Last active
July 19, 2024 17:40
-
-
Save jonasfroeller/0e42c350947c7d04b0dc8a9735f2412e to your computer and use it in GitHub Desktop.
A blacklist for Synology folders and files.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Version] | |
major = 1 | |
minor = 1 | |
[Common] | |
max_length = 0 | |
max_path = 0 | |
[File] | |
black_suffix = ".lnk", ".pst", ".swp", ".temp", ".tmp" | |
max_size = 0 | |
[Directory] | |
black_name = ".next", ".nuxt", ".svelte_kit", "node_modules", "vendor" | |
[EA] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
REM The '@echo off' command is used to turn off the display of each command in the batch file as it is executed. | |
setlocal | |
REM 'setlocal' is used to limit the scope of environment variable changes to the current batch script. | |
set sourceFile=.drive_global_blacklist.filter | |
REM 'sourceFile' variable is set to the path of the file whose contents you want to copy. | |
for /D %%I in (C:\Users\%USERNAME%\AppData\Local\SynologyDrive\data\session\*) do ( | |
REM This loop iterates through all subdirectories under the specified path. | |
if exist "%%I\conf\blacklist.filter" ( | |
REM Check if the file to be overwritten exists in the current directory. | |
copy %sourceFile% "%%I\conf\blacklist.filter" /Y | |
REM Copy the contents of the source file to the destination file, overwriting it. The '/Y' flag suppresses the confirmation prompt. | |
echo File contents copied to %%I\conf\blacklist.filter | |
REM Display a message indicating that the file contents have been copied successfully. | |
) else ( | |
echo %%I\conf\blacklist.filter does not exist. | |
REM Display a message if the destination file does not exist in the current directory. | |
) | |
) | |
endlocal | |
REM 'endlocal' is used to end the local environment variable changes made within the script. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment