1.

Solve : MSDOS batch file - del wildcards?

Answer»

At our SCHOOL we want to be able to delete all the contents of the My Music, My Pictures and My Videos folders on the computers with a batch file. I know there's

DEL "C:/Documents and Settings/username/My Documents/My Pictures/*.*" /Q

But the problem is there's dozens of computers and they each have dozens of different users on WINDOWS XP.

Is there a wildcard that I can USE with DEL or RMDIR in the path at 'username' so it will select all the folders, then go on to delete each "/My Documents/My Pictures/*.*" in each of the different users folders? WITHOUT having to specify each different actual username.

Cheers in advance.This might work:

Code: [Select]del "%userprofile%/My Documents/My Pictures/*.*" /Q

Good luck.



Discussion

No Comment Found