[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.2

Compressing output file after backup

Asked by naughtynat in DriveCopy, VB Script, Windows XP Operating System

Tags: robocopy, compress, vbs

Below is the backup script that I have setup and it seems to do the job pretty good.

only issue is that the output txt file can sometimes be quite large with a few thousand enteries.

I was wondering if someone could help with the following as I would like to compress the output text file.

part of the ms server 2003 res kit has compress.exe which does the trick

from command line you can run

compress -s -z c:\Customername.txt c:\Customername.tx_

what I need to be able to do is:

know what I need to do to run it within the vbscript
I havent tried but just wondering if I put the full if this would work as would need to work so can utilise all the same names
compress -s -z C:\CUSTOMERNAME" & right("0" & month(date),2) & "-" & right("0" & day(date),2) & "-" & year(date) & ".txt" C:\CUSTOMERNAME" & right("0" & month(date),2) & "-" & right("0" & day(date),2) & "-" & year(date) & ".tx_"
would then just need to change that the output file that is sent is the .tx_ one. Would also be good if it was easy to delete the intial TXT file, but that isnt important.

Main reason for this is basically you get about 85% compression on the files.

I would be running this script on Server 2003, WinXP & Vista

Many thanks for your assistance

Cheers
nat
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
dim objShell
dim strTarget, strDest, strParameter, strRoboExe
set objShell = CreateObject("Wscript.Shell")
strTarget = "e:\TARGETLOCATION"
strDest = "c:\BACKINGUPFROMLOCATION"
strParameter = "/S  /PURGE /TS /FP /NP /TEE /XJ /R:1 /W:2 /LOG:C:\CUSTOMERNAME" & right("0" & month(date),2) & "-" & right("0" & day(date),2) & "-" & year(date) & ".txt"
strRoboExe = "C:\MSP\tools\robocopy.exe"
 
objShell.Run strRoboExe &" " &strDest &" " &strTarget &" " &strParameter,0,true
Msgbox "Finished robocopy sync"
Set sendmail = CreateObject("CDO.Message")
 
sendmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
sendmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.gmail.com"
sendmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465
sendmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendemailaddress") = "my@gmail.com"
sendmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
sendmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") = "my@gmail.com"
sendmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "password"
sendmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = true
 
sendmail.Configuration.Fields.Update
 
sendmail.From = "my@gmail.com"
sendmail.To = "customer@isp.com.au,backup@msp.com"
sendmail.Subject = "CUSTOMERNAME Robocopy Backup Job"
sendmail.Textbody = "Your Robocopy Backup Job has completed - attached file has details"
sendmail.AddAttachment "C:\CUSTOMERNAME" & right("0" & month(date),2) & "-" & right("0" & day(date),2) & "-" & year(date) & ".txt"
sendmail.Send
msgbox("mail sent")
[+][-]10/14/09 10:06 AM, ID: 25572659Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: DriveCopy, VB Script, Windows XP Operating System
Tags: robocopy, compress, vbs
Sign Up Now!
Solution Provided By: Alan_White
Participating Experts: 1
Solution Grade: A
 
[+][-]10/14/09 11:06 AM, ID: 25573302Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/15/09 02:01 AM, ID: 25578615Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92 - Hierarchy / EE_QW_3_20080625