0

Im after some assistance if possible i currently use a works laptop which i also use for personal use. what i would like to do as is create a .BAT if this is the best method to delete various folders and files in different directories should i ever have to give it back at short notice. i have listed a few examples below.

C:\Users\Me\Dropbox\ C:\Users\Me\Music\ C:\Users\Me\OneDrive\ C:\Users\Me\Dropbox\ C:\Users\Me\Documents\Outlook Files\

Thank you for your help.

0

1 Answer 1

0

Your basic batch file will look something like this:

@Echo Off
RD /Q/S "C:\Users\Me\Dropbox"
RD /Q/S "C:\Users\Me\Music"
MD "C:\Users\Me\Music"
RD /Q/S "C:\Users\Me\OneDrive"
RD /Q/S "C:\Users\Me\Dropbox"
RD /Q/S "C:\Users\Me\Documents\Outlook Files"
Del /f/q/a %0

The RD will remove the folder and the /Q/S will delete sub-objects silently. The last line will delete the batch file itself once it has finished executing.

Just add additional RD /Q/S entries for additional folders; make sure the folder names to not have a trailing [\] or it may cause a syntax error.

You would be better off placing all your "custom" files within a single fodler on the desktop that you can just drag off in a hurry.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .