• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1553
  • Last Modified:

Script Unrar winrar archive on download completion

Hi All,

we frequently transfer files between different remote servers at work, the files are in the form of Winrar archive split into smaller individual files.  My question is how can i script a solution where on completion of the transfer/download between servers the file will automatically Unrar/unzip.  My preference is to script this using vbscript.  Any help/advice is appreciated.

Mike
0
StiggySon
Asked:
StiggySon
  • 3
  • 3
1 Solution
 
PaulHewsCommented:
This will run winrar to extract the files (with paths) in c:\temp\temp.rar to c:\temp\test folder

Dim oShell
Set oShell = WScript.CreateObject ("WScript.shell")
oShell.run """C:\Program Files\WinRar\WinRar.exe"" X ""C:\Temp\Temp.rar"" C:\Temp\Test"
Set oShell = Nothing
0
 
StiggySonAuthor Commented:
Hi Paul,

extract script works a treat.  it's a nice and simple solution thanks, is there anyway of running a test to check that the file has completed it's download.  If not no worries.  thanks

Mike
0
 
PaulHewsCommented:
What method do you use to transfer the files?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
StiggySonAuthor Commented:
usually FTP, i upload the files to our local ftp server, then pull the files down to the remote servers from the local ftp server.
0
 
PaulHewsCommented:
If you are automating the FTP, then the file completion should be signalled from that step, shouldn't it?  I can't see otherwise how the script is going to know when you've downloaded all the pieces, unless there's a fixed number of them, or unless you downloaded the last piece first.

You can use the FileSystemObject to test for the existence of files, so if you know which files should be there, you can test for them that way.
0
 
StiggySonAuthor Commented:
Your right, i can do a check for the number of files, and start the script based on that.

Thanks for the help

Mike
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now