Hi
Id need the Full path of the location to the folder, What permission you are wanting , if its full access or deny access , ill wip you something up
if you can write such as
full control (unticked)
write (TICK)
read (TICK)
@echo off
cls
title File Permissions
echo.
Echo Set File Permisions
echo.
echo Deny write + Read
echo (execute also included as mandatory)
echo.
Echo 1) Apply Read only
echo 2) Reset (Full Control)
set choice=
set /p choice=Please select your option:
IF NOT '%Choice%'=='' SET Choice=%Choice:~0,1%
if '%choice%'=='1' goto enab
if '%choice%'=='2' goto reset
:enab
cls
cacls "C:\Danea\Archivi/*.*" /p %username%:n
echo.
cacls "C:\Danea\Archivi/*.*" /e /g %username%:r
exit
pause
:reset
cacls "C:\Danea\Archivi/*.*" /e /g %username%:f
pause
ok these are based on the fact
READ + EXEC
READ
WRITE - DENY
SPECIAL PERMS -DENY
there is no point implying a read only command if not DENY commands arnt set, as you can still write to the files
@echo offcls
title File Permissions
cls
cacls "C:\Danea Easyfatt\Archivi\Amodio - Allegati\Doc\*.*" /p "Authenticated Users":n
echo.
cacls "C:\Danea Easyfatt\Archivi\Amodio - Allegati\Doc\*.*" /e /g "Authenticated Users":r
exit
It must have user input , The cacls command doesnt have a switch /y command for an auto answer
Sorted it for you, Took me some time HOWEVER this works
Code::enab cls echo y| cacls "C:\Danea\Archivi/*.*" /p %username%:n echo. echo y| cacls "C:\Danea\Archivi/*.*" /e /g %username%:r exit
I Have piped the command into the initial command
your welcome
any more scripts or anything then let me no, we can create loads of different tasks from file hiding to locking etc
Hello
How are you
well depends on what you want to acheieve,what you want to show or act etc
Windows CMD Commands
That has a list of commands, applying them into a script maybe a little harder than it looks BUT im here if u need help. Wat was u thinking of creating?
@echo off
cls
color A
set /p f=Files to be moved:
set /p d=Destination :
xcopy %f%" "%d%
pause