Feb-08-2020, 03:33 AM
(Feb-07-2020, 10:50 PM)jim2007 Wrote: So two things to check:
- Check if you can create a file in the folder with notepad for instance
- Your variable my_zip points to a folder name and not a file. It should be something like: my_zip = r"C:\Users\username\My_Dataset\<name>.zip"
Let us know how you go.
Thank you, I can create a file, actually I have another script, I run from PyCharm and it works on the folder, but this script gives me a permission error.
The reason my_zip points to a folder is I have a folder with zip files and I'm trying to go through them in order to extract their content into a main file. The script I have (which works) does the job but it only extract one layer of zip files, if a zip file has a subfolder in it (not necessarily a zipped folder) it won't extract those to my "main" folder. This is what I'm trying to achieve with the script that gives me an error.
Thank you for your help again.