Delete directory regardless of 260 char limit

后端 未结 17 1628
無奈伤痛
無奈伤痛 2020-12-08 02:03

I\'m writing a simple script to delete USMT migration folders after a certain amount of days:

## Server List ##
$servers = \"Delorean\",\"Adelaide\",\"Brisba         


        
17条回答
  •  囚心锁ツ
    2020-12-08 02:48

    PowerShell can easily be used with AlphaFS.dll to do actual file I/O stuff without the PATH TOO LONG hassle.

    For example:

    Import-Module 
    
    [Alphaleonis.Win32.Filesystem.Directory]::Delete($path, $True)
    

    Please see at Codeplex: https://alphafs.codeplex.com/ for this .NET project.

提交回复
热议问题