| | | cls | | | | $txt_file = 'b.txt' | | $src_dir = 'D:\A\rar' | | $dest_dir = 'D:\123' | | New-Item -ItemType Directory -Path @($src_dir,$dest_dir) -ErrorAction SilentlyContinue | | | | $tag_arr = Get-Content -Path $txt_file -Encoding UTF8 | | | | Get-ChildItem -Path $src_dir | Where-Object { !$_.PsIsContainer -and $tag_arr -contains $_.Name } | foreach { | | Move-Item -LiteralPath $_.FullName -Destination $dest_dir | | }COPY |
|