Skip to main content

Below I have included the python code I added to the startup script, how do I include the zip file module if possible?

import os

import zipifle

 

def convert_to_zip(path):

for root, dirs, files in os.walk(path):

for filename in files:

if filename.endswith('.ghg'):

# print root

oldname = os.path.join(root, filename)

newname = oldname + ".zip"

os.rename(oldname, newname)

 

def convert_to_zip(path, extract_path):

for root, dirs, files in os.walk(path):

for filename in files:

if filename.endswith('.zip'):

# print root

zf = ZipFile(path, 'r')

zf.extractall(extract_path)

zf.close()

 

 

convert_to_zip("")

Hi,

It looks like it might just be a typo in your import statement.

It reads zipifle instead of zipfile.

Simon


Hi,

It looks like it might just be a typo in your import statement.

It reads zipifle instead of zipfile.

Simon

Thank you. silly mistake on my path


Thank you. silly mistake on my path

No problem! Easily done!


Reply