Copy file with square brackets [ ] in the filename and use * wildcard

后端 未结 9 1457
迷失自我
迷失自我 2020-12-08 22:35

I\'m using PowerShell on Windows 7, and writing a script to copy a bunch of files from one folder structure to another. Kind of like compiling. The PowerShell Copy-I

9条回答
  •  醉话见心
    2020-12-08 23:05

    I use this:

     Copy-Item  $file.fullname.replace("[", "``[").replace("]", "``]") $DestDir
    

提交回复
热议问题