PowerShell: How can I suppress the error if file alreadys exists for "mkdir" command?
Add the -Force
parameter to the command.
Use:
mkdir C:\dog -ErrorAction SilentlyContinue
Add the -Force
parameter to the command.
Use:
mkdir C:\dog -ErrorAction SilentlyContinue