Page 1 of 1

New to batch programming

Posted: 04 Aug 2018 23:09
by ahzong
Here is a line of code which deletes all files in the current directory:

Code: Select all

DEL . DR
As far as I know,

Code: Select all

DEL
means delete,

Code: Select all

.
means the current directory.
What does

Code: Select all

DR
means?

Re: New to batch programming

Posted: 05 Aug 2018 04:36
by penpen
That should be just another name in the list of files to be deleted, so it deletes a file called "DR" within the current directory.
I don't see any benefit adding that to a list of filenames that contains all files in the current directory (".") which covers the file "DR".

penpen

Re: New to batch programming

Posted: 05 Aug 2018 05:04
by aGerman
Or it's a typo and /AR was actually meant. In that case only files with the "read only" attribute would have been deleted.

Steffen