VB call execute file

Posted on 2006-05-01
Last Modified: 2010-05-01
  I have an execute file which was written in C++;  When I run the program in command line, I type

c:\enc abc.txt enc_abc.txt          'encoding processin

c:\dec enc_abc.txt abc.txt         'decoding process

but I got a lots of text file to be encoded and decoded.

Is it possible to use VB to create an interface and let user select all the file and call the external exe file to do the process in batch?
Question by:goretti
    LVL 9

    Expert Comment

    You need keep all the files which are all encoded in to a single directory.
    Then, Using VB & directory list box control let the user to select the directory.
    Using that direcotry you can browse all the files in it by using File List box control.
    using a loop you can call ur executable and encode/decode your files.

    calling executable using shell command will be look like

    Shell "c:\enc " & strSourceFileName & " " & strTargetFileName

    Using the above snippet and a loop you can encode more than one file at a time (asynchronously).

    LVL 9

    Accepted Solution


    Author Comment

    Yes finally I did it myself

    Author Comment


    Author Comment

    but seems got a problem
    i can run it propoerly in DOS but fail to call out

    anything wrong?
    LVL 9

    Expert Comment

    for which question u r asking? 4 current one or 4 linked question???

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    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.

    When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
    You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
    Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
    Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

    760 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

    7 Experts available now in Live!

    Get 1:1 Help Now