Locate and delete a file

Is it possible? And if so, how? To use PDQ Deploy to locate and delete a file that is located in every users Appdata folder? My goal is to locate and delete any instance of  "C:\Users\username\AppData\Local\Google\Chrome\User Data\Default\Login Data". Is this possible? Or would this simply take too long to process on a large number of PCs with multiple users?

0

Comments

2 comments
Date Votes
  • When we want to delete a file from all profiles we use a batch file to cycle through the profiles and deleting the file in each one if found.

    I haven't tested it with your file, but you should be able to create a package with a step that calls a batch file that contains the following:

    for /f %%a in ('dir /B /AD C:\Users') do (
        if exist "C:\Users\%%a\AppData\Local\Google\Chrome\User Data\Default\Login Data" del /F /Q "C:\Users\%%a\AppData\Local\Google\Chrome\User Data\Default\Login Data"
    )

    Update: Edited to fix incorrect path in my first post..

     

    0
  • The repository is located by default at%PUBLIC%DocumentsAdmin ArsenalPDQ DeployRepository; however, you can change the location of the repository using the Repository settings in Preferences. You can check it, elastic man

    0

Please sign in to leave a comment.

Didn't find what you were looking for?

New post