Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get foldername?

Status
Not open for further replies.

Chambers

IS-IT--Management
Joined
Jan 19, 2001
Messages
257
Location
US
Hi guys, I am attempting to write a script that will call a rar command and inject the foldername into the command line, basically the folder structure looks like this;

FolderName
- filename.txt

I need to perform this command

rar a 'Foldername'.rar *.txt
delete *.txt

Having a problem figuring out how to inject that foldername into the commandline. Thank you.
 
Are you doing this in ASP/VBScript using FSO?
 
Use shell.run

Example:

Code:
Set WSHShell = CreateObject("Wscript.Shell")
WSHShell.Run "rar a " & Foldername & ".rar *.txt"


I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top