Solved

window command

Posted on 2011-02-12
8
294 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 70

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
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 
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 70

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 70

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
A quick step-by-step overview of installing and configuring Carbonite Server Backup.

732 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