Bob Brown
asked on
Deleting from user profile subfolders using batch or line command
I am trying to delete a text file from all of the user profiles within the c:\Users and F:\Users on a Windows 2008 r2 server, using Del /q /f /s c:\users\%user profile%\folder1\folder2\* .txt. which does not work, and the error says path not found. I need to delete the text file from all the users folders on the server.
how can I make it work.
how can I make it work.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Notice that it is in TEST mode currently, run it in a new command window, and it will display the DEL commands it would execute but not actually execute them (no files will be deleted yet). This allows you to run it and inspect the console output to verify it will delete the desired files. Then if all looks well removes the "ECHO" before the DEL command and rerun.
Open in new window
»bp