473,324 Members | 2,246 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Getting a .bat file location in the application location and executing it

Im trying to make my application check for any .bat files In its location
im using

Dim directory As String = My.Application.Info.DirectoryPath

to the my application directory
and im using This

Dim di As New IO.DirectoryInfo(directory)
Dim diar1 As IO.FileInfo() = di.GetFiles("*.bat")
Dim dra As IO.FileInfo


To Check For a .bat file in the application location

But now how do i get it to run the .bat file if there is only one of its kind?
Mar 16 '14 #1
1 3128
Frinavale
9,735 Expert Mod 8TB
Use the Shell Function to execute the .bat files.

-Frinny
Mar 18 '14 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Xenia | last post by:
Hello! Is anyone can help me to figure out how to write some xml into huge xml file into speceific location??? Say, i have a file about 139 Mb and i need to write some data (xml) into it, but...
4
by: grs | last post by:
Can a class library have a app.config file. Reason for asking is that the microsoft application blocks all read from myApp.exe.config. How can you use the application blocks if you do not have an...
2
by: Brian Henry | last post by:
I want to list out a directory listing along with showing the file type name (like explorer does when it says something like "MyDoc.DOC - Microsoft Word Document" How do I get that file type name...
2
by: Craig | last post by:
Does anyone know of a good File Manager application that is available for ASP.NET? Something that would allow the bulk uploading of files that would be available for download, and that would...
0
by: wdweb | last post by:
Hello, Thanks in advance for any tips. I am building a file management application which will allow file markup/sharing across the internet for all ms office, adobe pdf, photographs and other...
1
by: John | last post by:
Dear, We have 2 IIS server on win2000. we use the web server for upload file from server1 IIS to server2 IIS. We can connect from IIS1 to IIS2 success but the file unable to upload with below...
2
by: artofshe | last post by:
Here is my code document.bgColor = "blue"; document.frames.location = "/IC.nsf/Get%20and%20Compare%20URLs?OpenView" OR
1
by: iwdu15 | last post by:
hi, how can i get the icon associated with a certain file type? thanks -- -iwdu15
1
by: neeraj | last post by:
Hi all I have developed desktop application in c#.net. I have installed it on 15 to 20 computers which all are in network. Application having some setting in app.config file. My problem it...
3
by: grant | last post by:
Good day, How do I open a text file from the applications install location? I am currently opening a text file using "StreamReader sr = new StreamReader("DB.txt");" and then reading from that...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.