Solved

window command

Posted on 2011-02-12
8
262 Views
Last Modified: 2012-05-11
I have window server 2003.
And I would like to have automatic process as following:

I have file called sample1.bak  in c:\backup\sample.bak
I would like to setup automatic process at 9:00 PM <<PST>>
And zip/rar to

in c:\backup\sample.zip Or
    c:\backup\sample.rar

Please provide working procedure and code. I am not network admin or programmer.

Thank
0
Comment
Question by:Webboy2008
8 Comments
 
LVL 8

Accepted Solution

by:
Toxacon earned 500 total points
ID: 34881634
You need to have a compression software with command line interface (CLI). If you buy Winzip or Winrar, they will have a CLI. (The test or free versions basically do not have a CLI.)

Windows zip/compressed file feature cannot be scripted.
0
 
LVL 68

Expert Comment

by:Qlemo
ID: 34882243
Agree. Some commonly used alternatives are 7zip (http://www.7-zip.org/), IzArc (needs an Add-On, see http://www.izarc.org/izarccl.html), or gzip (http://gnuwin32.sourceforge.net/packages/gzip.htm). The latter will compress single files only, since it is originating from UNIX tools.
0
 

Author Comment

by:Webboy2008
ID: 34883054
Will above software you guys mentioned can do the job 100% I posted?
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 8

Expert Comment

by:Toxacon
ID: 34883136
Yes, for example winrar command would be:

winrar m c:\backup\sample1.bak c:\backup\sample.rar

Open in new window


That command will compress file sample1.bak and move it archive sample.rar.

You can set this up to be run at specified time with Task Scheduler.
0
 
LVL 68

Expert Comment

by:Qlemo
ID: 34883215
All those tools will allow for automated execution.
Creating a scheduled task, for whichever tool you use, can be done via the Task Scheduler, which is interactive, or by command (using the winrar as example):
schtasks /create /sc daily /tn "Zipper Task" /tr "winrar m c:\backup\sample1.bak c:\backup\sample.rar" /st 21:00

Open in new window

The string after /tn provides the (arbitrary) name you want to have for the task.
After /tr follows the complete commandline of the task to execute.
0
 
LVL 5

Expert Comment

by:NARANTHIRAN
ID: 34894198
I think Task Scheduler could perform ur task on a specific time.  
0
 
LVL 68

Expert Comment

by:Qlemo
ID: 35067071
Can you explain, please, why you accepted only one answer? It did not cover all aspects of your question, and there were several other comments with more details.
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

943 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now