Batch file runs all functions instead of specified one
I am making a .cmd/.bat file to launch my applications. It give the user 2 choices for what they want to do, and is supposed to run the function for that choice:
Windows cmd for-in file in directory script doesn’t work while copy-pasting does work
I am attempting to loop over every file of a directory using Windows cmd ([Version 10.0.14393]
), but I’m encountering a peculiar behavior. When I run the following script as a script, it gives me a syntax error. However, when I copy and paste the code from the script into the terminal, it runs as I would expect (printing the file name of every file in demo
. How do I achieve the copy-paste behavior in the script?
Create and use bat files that set and use environment variables, but environment variables are null
Create and use bat files that set and use environment variables, but environment variables are null
Problem with selector in CMD, closes after user type the entry
I am developing a script in which I need the user to select from a list that provides them with the tool they want to use and that depending on this input takes them to the other part of the code. However, since I don’t know much about batch language, I asked ChatGPT and with similar projects that I saw on this site, I tried to do it. The problem in general is when the user types the number and presses enter, the program closes immediately. This is my code:
Finding specific application from location running, not just the application.exe?
I want a way of running and checking two of the same application.exe’s using two different bat scripts in case they crash, in order to do this, I need to check each one individually based on the path the .exe came from.