I ran into similar issues with my ionic projects and I resolved all of them with the Windows built-in RoboCopy (“Robust File Copy”) program.
First, to delete a folder with long path names, create a batch files with these contents (say it’s called delfolder.bat):
@echo off
REM from here: http://kb.ischool.uw.edu/use-robocopy-to-delete-filesfolders-with-long-filenames/
if {%1}=={} @echo Syntax: DelFolder FolderPath&goto :EOF
if not exist %1 @echo Syntax: DelFolder FolderPath – %1 NOT found.&goto :EOF
setlocal
set folder=%1
set MT=“%TEMP%\DelFolder_%RANDOM%”
MD %MT%
RoboCopy %MT% %folder% /MIR
RD /S /Q %MT%
RD /S /Q %folder%
endlocal
and then run
delfolder [your-folder-name]
RoboCopy can also be used to copy folders with long pathnames(just like XCOPY); I recommend you review all its options.