delete files with robocopy if windows show error "file name to long"

  1. create directory mkdir deletelongname
  2. suppose D:\backup\public directory contains the files which are not able to delete simply
  3. run command robocopy D:\deletelongname D:\backup\public /purge ( after command finish execution, both folders are empty )
  4. run command to delete directory deletelongname and public