0

I am running a batch file "batch.bat" Inside the batch file i am calling a VB exe file "test.exe". Within the VB I am trying to open a text file "new.txt".

I am stuck at passing an error message or some variable back to batch file "batch.bat" when the text file "new.txt" is not found.

I appreciate if someone can help me with this.

Thanks,
Kiran

2
Contributors
1
Reply
2
Views
11 Years
Discussion Span
Last Post by choudhuryshouvi
0

u can try the DIR function to check whether the file does exist or not.here is a sample :

if dir("c:\test.txt")<>"" then
msgbox "file found"
else
msgbox "file not found"
endif

This topic has been dead for over six months. 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.