43 lines
337 B
PowerShell
43 lines
337 B
PowerShell
|
|
|
|
function Move-Item2 {
|
|
|
|
param ($file)
|
|
|
|
|
|
Try {
|
|
|
|
$file = Get-Item -Path $file -ErrorAction Stop
|
|
|
|
}
|
|
|
|
Catch {
|
|
|
|
write-host "error"
|
|
|
|
}
|
|
|
|
IF ($file.Extension) {
|
|
|
|
write-host "ext"
|
|
|
|
|
|
}
|
|
|
|
ELSE {
|
|
|
|
write-host "no ext"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
Move-Item2 -file E:\bwtserver.txt
|
|
|
|
#copy-item
|
|
step-
|
|
|
|
check-
|
|
get-verb
|