Home All Groups Group Topic Archive Search About

[MSH beginner question] how to test for file existence and delete them

Author
10 Apr 2006 5:21 AM
Lloyd Dupont
in C# I could very easily wrtie Directory.Exsists(aDirectory)

I would like to do the same thing with MSH.
I would like to avoid the following trickery
if ( [SYstem.IO]Directory.Exists("file") )  {}
There should some Commandlet or something.
Any clues?

Basically I would like to test for the existance of a directory and, if it
does exist, delete it (it might not be empty)
Any tip?

AddThis Social Bookmark Button