Accessing files beyond MAX_PATH in C#/.NET

前端 未结 5 1419
粉色の甜心
粉色の甜心 2020-12-16 20:56

BACKGROUND

I need to write a tool using .NET version 2.0 at highest (using something off the shelf is not an option for this client for political, c

5条回答
  •  暖寄归人
    2020-12-16 21:40

    I have had success deleting directory structures using below small script. pushd uses UNC format which gives you 32K instead of 260 limitation

    set "folder=\\SERVER\SHARE\DIVISION\DEPARTMENT\NAME OF TEAM - COULD BE FAIRLY LONG\" 
    pushd "%folder%"
    for /d %%i in ("*") do rmdir "%%i" /s /q
    popd
    

提交回复
热议问题