Workaround to remove or rename files with long names


/ Published in: Other
Save to your folder(s)

Workaround to remove or rename annoying files with long filenames


Copy this code and paste it in your HTML
  1. REM map a temporary directory to the current path
  2.  
  3. subst T: .
  4. T:
  5.  
  6. REM rename the file
  7. rename "a-very-long-(over-200-characters-here)-name.doc" shortname.doc
  8.  
  9. REM or remove it
  10. del "a-very-long-(over-200-characters-here)-name.doc"
  11.  
  12. REM then detach the temp. drive
  13. C:
  14. subst T: /d

URL: http://ask.metafilter.com/mefi/31958

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.