我有一些没有文件扩展名的文件。如何在powershell中移动它们?
以下是我的文件:
$backupPATH = new-item -ItemType directory C:\Users\user\Desktop\location\$(get-date -f MM-dd-yyyy_HH_mm_ss)
$date = (get-date).AddDays(-60)
get-childitem -Path C:\Users\user\Desktop\test1 *.tsv |
where-object {$_.LastWriteTime -lt $date} |
move-item -destination $backupPATH
以下是移动没有扩展名的文件的脚本,但不确定从哪里开始。
get-childitem -Path C:\Users\user\Desktop\test1 |
where-object {$_.LastWriteTime -lt $date} |
move-item -destination $backupPATH