FN-GM Posted June 9, 2011 Posted June 9, 2011 Hi, I am trying to create a batch file to delete all the desktop.ini files from student home areas. I have this code. del /F /S "D:\Shared Folders\StudentHomeAreas\desktop.ini" it seems to get rid of some of them but most remain. Does anyone have any thoughts please? Thanks
Steve21 Posted June 9, 2011 Posted June 9, 2011 Hi, I am trying to create a batch file to delete all the desktop.ini files from student home areas. I have this code. del /F /S "D:\Shared Folders\StudentHomeAreas\desktop.ini" it seems to get rid of some of them but most remain. Does anyone have any thoughts please? Thanks Have you checked if it's giving you a yes/no to delete? I know force should stop it, but might be worth trying it with a /Q Also the ones that aren't deleting do they have indexing enabled on them? Steve
sted Posted June 9, 2011 Posted June 9, 2011 perhaps the ones it leaves are open otherwise locked? what about doing something like havnt tested just thiking out loud dir /b/s D :\Shared Folders\StudentHomeAreas\desktop.ini >d:\todelete.txt for /f %%u in (todelete.txt) do (del %%u )
FN-GM Posted June 9, 2011 Author Posted June 9, 2011 Ah im aving a bad day, this did the trick. Typical as soon as i post here i get it sused! del /F /S /A S "D:\Shared Folders\StudentHomeAreas\desktop.ini" 1
Defcon Posted June 9, 2011 Posted June 9, 2011 It might be some of the ini files are hidden or system you might need to use attrib to unhide them or mark them as non system before deleting
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now