You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The solution to this is the same as the using Python's zipfile module ZipFile.write
You can get the results you want by specifying the name you would like the file to have in the archive (here I'm using os.path.basename() to get the last part, the filename in your example, from the full path):
I have got a list of file paths and I wanted to create an encrypted zip file using them.
The above code creates the encrypted zip file, however it also creates the directories. For example when I extract the content of the zip.
How can I avoid this? I want to find only the files testfile_1.csv, testfile_2.csv, testfile_3.csv when I extract the zip.
The text was updated successfully, but these errors were encountered: