Jump to content

Recommended Posts

Posted (edited)

I need to add a multitude of files to different zip files, then delete the original file that got zipped. (Not the zip file)

Example:

File1.txt -> File1.zip -> Delete File1.txt

It also needs to add each file to a different zip, with the name of the file I put in it, instead of every single one into one zip.

#include <_ZipPlugin.au3>
#include <array.au3>
$hplugin =PluginOpen (@ScriptDir&"\Au3Zip.dll")
$plugin2 =PluginOpen (@scriptdir&"\au3zipc.dll")


$i = 0
Do
    Dim $string = ("C:\Documents and Settings\Administrator\Desktop\Test\File1\*.*")
    $zip = _ZipCreate ("C:\Documents and Settings\Administrator\Desktop\test\File2\"&$string&".zip")
    _ZipAdd ($zip, "C:\Documents and Settings\Administrator\Desktop\Test\File2\*.*", $string )
    $i = $i + 1
Until $i = 5

That script returns

1
Trying:C:\Documents and Settings\Administrator\Desktop\\est\File2\C:\Documents and Settings\Administrator\Desktop\Test\File1\*.*.zip
Trying:C:\Documents and Settings\Administrator\Desktop\\est\File2\C:\Documents and Settings\Administrator\Desktop\Test\File1\*.*.zip
Trying:C:\Documents and Settings\Administrator\Desktop\\est\File2\C:\Documents and Settings\Administrator\Desktop\Test\File1\*.*.zip
Trying:C:\Documents and Settings\Administrator\Desktop\\est\File2\C:\Documents and Settings\Administrator\Desktop\Test\File1\*.*.zip
Trying:C:\Documents and Settings\Administrator\Desktop\\est\File2\C:\Documents and Settings\Administrator\Desktop\Test\File1\*.*.zip
>Exit code: 0   Time: 0.451

But none of the files are ever made.

Can someone please help me out?

Edited by houseonfire

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...