I have been having issues when trying to insert information to listdir.
initially, I have tried to manually put in the info:
for file in os.listdir(r'H:\My Documents')
where I get this error: [Errno 2] No such file or directory: 'H:\\My Documents'
then the below
list_of_directory = r'H:\My Documents'
for file in os.listdir(list_of_directory):
to which I got the same error.
I have tried everything including the solution mentioned here Error with double backslash in Windows path in Python but it wouldn't work.
can you please help? The rest of the code is ready and it's so frustrating that it has to wait due to this glitch!