New to batch programming

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
ahzong
Posts: 7
Joined: 04 Aug 2018 23:04

New to batch programming

#1 Post by ahzong » 04 Aug 2018 23:09

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?

penpen
Expert
Posts: 1669
Joined: 23 Jun 2013 06:15
Location: Germany

Re: New to batch programming

#2 Post by penpen » 05 Aug 2018 04:36

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

aGerman
Expert
Posts: 3606
Joined: 22 Jan 2010 18:01
Location: Germany

Re: New to batch programming

#3 Post by aGerman » 05 Aug 2018 05:04

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

Post Reply