|
Answer» hello, i need a detailed explanation on how to make batch file in visual basic with visual STUDIO, using simple commands like this
@echo off title color 0a set /p "filename=Enter name of file : " set /p "filetext=Enter text to put in file : " echo %filetext% >> some %filename%.txt echo Created File ("%filename%"). echo complete. pause
nothing to much really, just trying to find detailed information on how to create a batch file in visual basic programming language and start it and it would be helpful if you could explain the VB commands... thank you If information is static its simple just USE write to file appended method but have it write to a file with .bat file extension.
https://msdn.microsoft.com/en-us/library/1t4kyezf.aspx
Then a system call to call to the batch file
http://en.allexperts.com/q/Visual-Basic-1048/System-call.htm
So from looks of it you want VB to create this batch file and then the batch file creates a text file to pass text into... Looks like homework?
I'd give it a try on your own with info SHARED and post code here when you have questions or problems vs us doing all the work for you.
Also not sure why you would be using VB to write static info and run the batch file when the batch file alone is fine by itself. The only benefit of VB for a batch file would be if your passing dynamic info to it and creating a new batch file with new info each time the VB program is run. But from your batch file, it all looks static and so the batch by itself does what you need without the VB needed to carry it out.Quote from: DaveLembke on February 13, 2016, 10:03:37 AM If information is static its simple just use write to file appended method but have it write to a file with .bat file extension.
https://msdn.microsoft.com/en-us/library/1t4kyezf.aspx
Then a system call to call to the batch file
http://en.allexperts.com/q/Visual-Basic-1048/System-call.htm
So from looks of it you want VB to create this batch file and then the batch file creates a text file to pass text into... Looks like homework?
I'd give it a try on your own with info shared and post code here when you have questions or problems vs us doing all the work for you.
Also not sure why you would be using VB to write static info and run the batch file when the batch file alone is fine by itself. The only benefit of VB for a batch file would be if your passing dynamic info to it and creating a new batch file with new info each time the VB program is run. But from your batch file, it all looks static and so the batch by itself does what you need without the VB needed to carry it out.
Not homework, i just need the basic command to send the text out to the batch file. thank you these links are very helpful. very appreciated! No problem... VB is not my strength but I have worked with it, mostly with VB6 back in the day. C++, C#, Python, and Perl are my choice these days depending on what I am making or altering. If you have any other questions feel free to post here.
What pushed me away from Visual Basic was that its for Windows only pretty much unless code is ported somehow. C++ and Python are my choices for cross platform programming. http://www.theregister.co.uk/2007/02/21/visual_basic_mono_linux/Quote from: DaveLembke on February 13, 2016, 10:33:32 AMNo problem... VB is not my strength but I have worked with it, mostly with VB6 back in the day. C++, C#, Python, and Perl are my choice these days depending on what I am making or altering. If you have any other questions feel free to post here.
What pushed me away from Visual Basic was that its for Windows only pretty much unless code is ported somehow. C++ and Python are my choices for cross platform programming. http://www.theregister.co.uk/2007/02/21/visual_basic_mono_linux/
Yeah i HEARD C# & C++ was better but i just use visual basic because i was told it was more beginner friendly
|