简体   繁体   中英

How to restrict files to being moved to another folder in win10?

Good day, I need to find out a way how to disable for win10 user to move specific file or files from specific folder . How this can be done for example with batch script code or there is another way how to do it? I appreciate to see solution in any program language , that can help me with.

Another obstacle would be, what if I want to restrict to move files from system folders like "C:\\Windows\\System32" path which is under administrator rights, and I suppose the person I will restrict can use those rights and move files.

I suppose too, that files I want to restrict to move, will OS often use and I won't to disable access to that files even for operation system, or any software in pc that needs it. Or another example, if you want to restrict hosts file to move, but browser would often look into it on startup or when hosts file content changed.

I did not actually find anything relevant, but only how to lock folder, but I think that's not the thing I need. Is it possible to do it, to restrict system files being moved? Do I need to work with Registry Editor?

If you are looking to solve this by writing a program, I think the tool you are looking for is icacls (part of win10).

The docs for this command are at https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/icacls

If you aren't looking to do a ton at once, however, I recommend right-clicking on the file and choosing "Properties" from the menu. From there, click on the "Security" tab. This will give you a way to change permissions on a file or directory by hand. More instructions for the manual solution here: https://support.microsoft.com/en-us/help/325361/how-to-configure-security-for-files-and-folders-on-a-network-in-window#2

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM