##TIMESTAMP CREATION
$ScripName = " "
$ydt = get-date -date $(get-date).adddays(-1) -format yyyyMMdd
$dt = date -f yyyyMMdd
$timeStamp= $(get-date -f MM-dd-yyyy_HH_mm_ss)
$path = "D:\\LOGS\$timeStamp"
if([IO.Directory]::Exists($path))
{
write-output "The folder exists"
}
else
{
$folCreate= New-item -type directory D:\LOGS\$(get-date -f MM-dd-yyyy_HH_mm_ss)
}
No comments:
Post a Comment