Jump to content

Extract Downloaded File?


Brett

Recommended Posts

I have a TCA Script running that downloads a .zip file, but I would like to take it another step and have the script extract the file after it has been downloaded. Is this possible to do from a TCA Script?

 

This is the current relevant code...

Dim serverplugin As TCAdminBase.Plugins.IGenericPlugIn = TCAdminSDK.Remote.InstanceCreator.GetPluginFromServer(service.ServerID, "TCAdminMonitor.StandardPlugins.RemoteServers.ServerUtilities")
serverplugin.Execute(New Object() {"DownloadFile", "http://xfactorservers.com/testfile.zip", savepath})

Link to comment
Share on other sites

I have a TCA Script running that downloads a .zip file, but I would like to take it another step and have the script extract the file after it has been downloaded. Is this possible to do from a TCA Script?

 

This is the current relevant code...

Dim serverplugin As TCAdminBase.Plugins.IGenericPlugIn = TCAdminSDK.Remote.InstanceCreator.GetPluginFromServer(service.ServerID, "TCAdminMonitor.StandardPlugins.RemoteServers.ServerUtilities")
serverplugin.Execute(New Object() {"DownloadFile", "http://xfactorservers.com/testfile.zip", savepath})

 

Brett,

 

Have you thought about it calling a batch file to do the extraction?

 

Thanks,

 

Jeremiah

Link to comment
Share on other sites

Thanks Jeremiah + ECF, I had considered that but being obsessive compulsive I always like to keep everything packed into one neat little file if possible.

 

I was assuming that there was probably some easy way to do so using the API that I was missing, but I will go ahead and just set it up this way for now.

Link to comment
Share on other sites

  • 7 months later...

It has been a while since I brought this up, but is there any chance of getting the code to do this as opposed to using a batch script for it? I would like to consolidate this completely to a tca script if possible.

 

*Edit*

 

Disregard, it looks like unZip() in the TCAdminSDK.Util Namespace will work.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Terms of Use