Use as Program or script: c:\windows\system32\WindowsPowerShell\v1.0\powershell.exe
and as arg use -executionpolicy bypass -file "C:\Temp\example.ps1"
where example.ps1 contain your script
Use as Program or script: c:\windows\system32\WindowsPowerShell\v1.0\powershell.exe
and as arg use -executionpolicy bypass -file "C:\Temp\example.ps1"
where example.ps1 contain your script
cls
$source="C:\next72\source"
$destination="C:\next72\destination"
set-location $source
$files=get-childitem -Recurse
foreach ($file in $files)
{
if (!$file.PsIsContainer)
{
$newName=$destination+"\"+[string]$file.LastWriteTime.Year +
[string]$file.LastWriteTime.Month +
[string]$file.LastWriteTime.Month +
[string]$file.LastWriteTime.Day +
[string]$file.LastWriteTime.Hour +
[string]$file.LastWriteTime.Minute +
[string]$file.LastWriteTime.Second +
[string]$file.Extension
Copy-Item $file.FullName $newName
}
}