Solved

RAR inside VBscript code

Posted on 2008-10-28
4
2,181 Views
Last Modified: 2012-05-05
The code below is rename folder to today's name
I need also to compress the result file in to folder name "_archive"  as:  
E:\Inventory Files\inventory\_archive\20081028.rar

how can I make this?
please help
strMonth = Month(Date)
If Len(strMonth) = 1 Then
strMonth = "0" & strMonth
End If
strDay = Day(Date)
If Len(strDay) = 1 Then
strDay = "0" & strDay
End If
strYear = Year(Date)
StrHour=Hour(Time)
StrDate = StrYear & StrMonth & StrDay
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.MoveFolder "E:\Inventory Files\inventory" , "E:\Inventory Files\" & StrDate

Open in new window

0
Comment
Question by:ahmed_bq
[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
  • 3
4 Comments
 
LVL 17

Expert Comment

by:Jared Luker
ID: 22822323
The easiest thing to do would just use the command line RAR utility with the Run command in vbscript.

The file is located in c:\program files\winrar\rar.exe

The syntax can be found here:

http://www.rarreg.com/users_manual.php
0
 

Author Comment

by:ahmed_bq
ID: 22822507
thanks jared_luker:

but I ned to insert rar command in vbscript using my variables as my quistion above!
0
 
LVL 17

Expert Comment

by:Jared Luker
ID: 22822545
You can use your variables within the run command
0
 
LVL 17

Accepted Solution

by:
Jared Luker earned 125 total points
ID: 22822557
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone 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

Welcome back!  My apologies for taking so long to write part two of this series; it's been a long time coming!  As I promised in Part 1, this article will focus on how to locate those elusive AD properties that you are searching for.  Why is this us…
This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

695 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