Hi.. I've to remove a very long path. I've written the below to try that but its giving WindowsError: [Error 206] (I've pasted it below). I've prepended "\\?\" to the actual path but still I'm getting the exception. Please let me know the solution...
++++
import os
import shutil
os.rmdir(os.path.realpath(r"\\?\D:\Kamesh\test-1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950\test-1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950\kkkkkkkkkkkkkkkkkkkkkkkkk\kllkppppppppppppp\long_path_test"))
++++++++++++++++
++++++++++
WindowsError: [Error 206] The filename or extension is too long: '\\\\?\\D:\\Kam
esh\\test-1234567891011121314151617181920212223242526272829303132333435363738394
041424344454647484950\\test-1234567891011121314151617181920212223242526272829303
132333435363738394041424344454647484950\\kkkkkkkkkkkkkkkkkkkkkkkkk\\kllkpppppppp
ppppp\\long_path_test'