Solved

window command

Posted on 2011-02-12
8
255 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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

I've always wanted to allow a user to have a printer no matter where they login. The steps below will show you how to achieve just that. In this Article I'll show how to deploy printers automatically with group policy and then using security fil…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This video discusses moving either the default database or any database to a new volume.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

758 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

22 Experts available now in Live!

Get 1:1 Help Now