[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

vbs script to read file and check if folder is there

Posted on 2011-09-29
1
Medium Priority
?
371 Views
Last Modified: 2012-05-12
hello hope you can help me, I need vbs script to read file TXT or XLS and check if folder is there

if not it writes to a file...
0
Comment
Question by:James Murrell
[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
1 Comment
 
LVL 7

Accepted Solution

by:
OklahomaDave earned 2000 total points
ID: 36902734
You should take a look at instantiating a Scripting.FileSystemObject. It has built-in methods to check for folder and file existence, and to open text files. Here's a sample of how to check for the presence of a folder:

function doesFolderExist(folderName)

Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
doesFolderExist = fso.FolderExists(folderName)

end function

You can also leverage the OpenTextFile method to read the TXT file. Reading .XLS files is a much more difficult task I'm not sure you really want to undertake in a VBScript file.

That should be enough to give you a push in the right direction. If you need further help, just post again and we'll go from there!

Good luck!
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

In this tutorial I will show you how to make a simple HTML bar chart with the usage of WhizBase, If you want more information about WhizBase please read my previous articles at http://www.experts-exchange.com/ARTH_5123186.html (http://www.experts-ex…
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Suggested Courses

649 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