Compressing folders in Windows using Python.
Steven D'Aprano
steve at REMOVETHIScyber.com.au
Sun Jan 1 07:21:05 EST 2006
On Sun, 01 Jan 2006 04:07:11 -0800, sri2097 wrote:
> Hi,
> I'm trying to zip a particular fiolder and place the zipped folder into
> a target folder using python. I have used the following command in
> 'ubuntu'.
>
> zip_command = 'zip -qr %s %s' % (target, ' '.join(source))
>
> I execute this using os.command(zip_command). It works fine...
>
> But when I run this script in Windows XP, I get an error while
> executing the above zip command.
Would you like to tell us what error you get?
No no, I'll just guess... your disk is full... am I close?
*wink*
> What command is there to zip files in Windows? Or is there any other problem ?
What happens if you call up a Windows command prompt and type zip at the
prompt?
--
Steven.
More information about the Python-list
mailing list