Hi,
I am looking to go to a file location, copy only the .zip files from that location and unzip them in another location. Thanks for the help.
Hi,
I am looking to go to a file location, copy only the .zip files from that location and unzip them in another location. Thanks for the help.
use copy file activity and zip activities .
1.use for each to iterate zip files.
Directory.GetFiles(FolderPath,“*.zip”)
2.inside for each use zip activity or invoke method …and In parameters pass the Folder path.
Hi,
Thanks for the response.
i have checked if the files are zipped and then tried the invoke method. The check works okay but not sure what the invoke method is supposed to be doing.
The first parameter is the location of the files i checked and the second location is where i would like to copy the unzipped files. Am i doing this correctly?
correct…if invoke method is not working in your case …then use balareva zip activities.
Hi,
Thanks for the reply. Yes the invoke method was not working for me. I was able to copy the zipped folder across using the balareva activities but it included .zip at the end of the folder name which i do not want.
On the attached screenshot: Path.GetFileName(item.ToString)
Then i have Var_TempFileName at the end of the extract folder path to try and give it the same name as the copied folder.
Any ideas on how to improve this?
In un zip activity pass this values.
ZipFile=Item.tostring
ExtarctFolder=YOurExtractFolderPath+Var_TempFileName
Hi @Automater999,
To zip and unzip you can use the below activity with the provision of password.
Regards
Balamurugan.S
Hi,
This is working fine now with just the .zip extension appearing in the folder name in the extract path.
Could this be avoided?
Get your file name without extensions…
FileName=Path.GetFileNameWithoutExtension(item.ToString)
Then pass this variable in extract folder name.
ExtarctFolder=YourExtractFolderPath+FileName
Hi @Automater999,
Sorry man took your xaml before you delete the thread. I have done some changes in your example xml.
Sample with changes.
fflattery.zip (92.2 KB)
Regards
Balamurugan.S
Hi thanks for this. the reason the zipped files were not being unzipped in the next location is because they were empty. My mistake. Thanks for this though