Solved need to delete file

May 4, 2012 at 09:35:37
Specs: Windows XP
hi i need to create a .bat file that will delete a folder in the windows directory for a few of my friends (so doing an individual one for each of them is out of the question) i knew this would be stored on a different drive letter for each computer so used the command %windir% but ever since i did that it says that it has deleted the file but it hasnt actually done it the command i am currently using to delete it is

erase %windir%\system32\game folders/s

(they like games but dont know why they put them into system 32 folder)

my question is what have i done wrong and what do i need to do to fix it!

See More: need to delete file

Report •

May 4, 2012 at 10:21:32
✔ Best Answer
The erase command cannot delete directories or folders, it can only delete files in a specified folder.

To delete a folder (which contains files) you must use the RD command or the RMDIR command, together with the /S switch.

The command string you have posted is also incorrect in the way you've typed the /S switch. After the word folders you must leave a space before typing the /s switch.

Report •

May 4, 2012 at 12:39:31
thanks that helped a lot

Report •
Related Solutions

Ask Question