0

I don't have AD access, but i have C$ access. There is folder name icon in every profile n almost every system in the domain. I like to delete it.
THIS IS THE PATH

\\%PCNAME%\c$\TSAPL\Users\%id%\Apps\icons

for

/f %%a in (C:\pclist1.txt) do for /f "tokens=*" %%b in ('dir /ad /a-h /b \\%%a\c$\Users\') do if exist "\\%%a\c$\Users\%%b\Apps\icons" rd /s /q \\%%a\c$\TSAPL\Users\%%b\Apps\icons

THIS WILL DELETE THE FOLDER.
BUT I DON'T WANT THE FOLDER TO GET DELETED.

PLS HELP.

3

rd is remove Directory (folder).

Change the delete command to:

del \\%%a\c$\TSAPL\Users\%%b\Apps\icons\*

That will delete all files with in the icons directory but leave the parent folder intact.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.