I'm looking at a batch file and I see the line below. I know what %LOG% is, but I do not know what the "rm" command is doing. Can anyone tell me?
rm "%LOG%"
I'm looking at a batch file and I see the line below. I know what %LOG% is, but I do not know what the "rm" command is doing. Can anyone tell me?
rm "%LOG%"
%LOG% - variable that contain path to log file and that command remove it.
rm
is not a standard ms-dos command. If you type it on the command line, what comes up?perhaps it is short for
rmdir
(a synonym ofrd
) which removes the specified directory.The
rm
is a command that's being run, rather than anything special for the batch file. Does the system which ran this batch file include the cygwin package? That provides Windows / DOS versions of various standard unix utilities, includingrm
- which is the remove command - similar todel
on such boxes.rm is a commandlet in Windows Powershell.
%LOG% is a variable defined in that batch file using set LOG="Something" (NOTE: It is not a global Variable or alias) So what it will do is delete the item pointed by variable LOG.
Even if this is not Unix,
rm
is going to be a command to delete a file. For example, see http://www.mkssoftware.com/docs/man1/rm.1.asp or http://www.cygwin.com/rm
is the *NIX version ofdel
so its deleting
%LOG%
, unless it fails b/s its not a command on Windows. ( PowwerShell maybe)