0

I need to start my VB.NET app through a batch file and pass an argument to it. The app uses the argument (a dated directory;Ex: 20120530) to process the data files there, output a CSV and a Log file and then close the app.

The app does not need any human intervention or input.

Can someone tell me how that is done?

2
Contributors
2
Replies
4
Views
5 Years
Discussion Span
Last Post by themaj
0

My.Application.CommandLineArgs

Thanks Jim, tried the code below and I 'get it'. I assume that early in my code I'll declare "Public My.Application.CommandLineArgs(0) AS String (or whatever)"

If My.Application.CommandLineArgs.Count > 0 Then
    MessageBox.Show(My.Application.CommandLineArgs(0))
    Else
    MessageBox.Show("No argument provided")
    End If

Appreciate the help

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.