Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Script issue to change folder permission

Options
  • 06-08-2015 12:50pm
    #1
    Registered Users Posts: 6,261 ✭✭✭


    Hi Folks

    I have a work PC and am trying to free space. IT (in India) gave me a script to run to change the permissions on the folders to allow me delete them. There are many folders but the problem folder is always the same name in each subsequent folder and always in the same location within each folder in c:/chem32

    I tried running this in CMD but got an error - %%d was unexpected at this time

    Can anyone help here

    IT response below

    run the following script. This will change the folder permissions. (Adapt the correct drive letter)
    After the script was running it should be possible to delete the VcsCache folder.

    REM remove “invisiblity” of vcscaches, the input folder must be the root of instruments (it looks for vcscache exactly on the 3rd level deep)

    FOR /D %%d IN ("c:\chem32*") DO FOR /D %%b IN ("%%d\*") DO FOR /D %%c IN ("%%b\vcscache*") DO (
    if /I "%%~nxc"=="vcscache" (
    cacls "%%c" /E /R BUILTIN\Users Everyone
    echo. %%c
    ))

    Thanks


Comments

Advertisement