This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 9001. |
Solve : batch, variables, and images? |
|
Answer» Hello world, |
|
| 9002. |
Solve : Problem Echoing a Digit to a File? |
|
Answer» Hi, Try: This will (probably) echo the trailing space too. Try this >myfile.txt echo 9 GrahamYES!! That's exactly what I needed, Graham! Thank you so much. I had no idea you could do that. That actually solved another problem I had too. This batch stores settings "profiles" for starting Flight Simulator and the user is prompted to give each profile a name. My only hope before this was that no one ever chose a name like "Profile 4" because obviously the same problem rears it's ugly HEAD when trying to store the name to the .ini file. Now I don't have to worry about, they can name it whatever they want. Went through and changed 48 occurances in this 1200+ line batch file and everything works perfectly now. Again, a very sincere thank you. Dusty, Graham's correct in that the space between the 9 and the > CAUSED the trailing space to be echoed to the .ini file. Oddly enough it still worked throughout the rest of the batch file even though it was effectively calling up the program with "...Flight Simulator 9 \fs9.exe" (note the space). The problem was when the user names or renames a profile the .ini gets completely re-written and echo %fspath% > myfile.ini adds a trailing space each time the variable is echoed so before long I wound up with 10 or 20 trailing spaces after the 9. Thank you both for your replies, I really appreciate it. Jim |
|
| 9003. |
Solve : To count Command line arguments (Paramaters) in .Bat file.? |
|
Answer» HI all!!!!!!!!! I am SENDING some parameters to a .bat file through command line. I want the count of that parameters means how many parameters I am passing. If i will enter less than the sufficient then the message should GET prompted to the user. Can anyone please give me the solution. thanks.You can check if a parameter is a null string For example if you are expecting four parameters... if "%1"=="" ( echo parameter 1 is missing goto end ) if "%2"=="" ( echo parameter 2 is missing goto end ) if "%3"=="" ( echo parameter 3 is missing goto end ) if "%4"=="" ( echo parameter 4 is missing goto end ) REM if you get here 4 parameters were passed REM HERE IS YOUR CODE :end Thanks !!!!!!!!!!!!!! It's working fine for me. Thanks again. |
|
| 9004. |
Solve : QBasic 1.1? |
|
Answer» I cannot get the COMMANDS SOUND, PLAY or BEEP to work on WINDOWSXP Pro. |
|
| 9005. |
Solve : Printing Excel files with .bat files? |
|
Answer» Is there a way to automatically PRINT a spread sheet from an Excel file with a batch (.bat) file?do you WANT to print to a printer? or just print the data to screen. |
|
| 9006. |
Solve : Start command in Batch file? |
|
Answer» I am trying to USE the start command for a networked printer. I cannot make the command work with a printer name that includes spaces. I TRIED using quotes but it will not FIND the printer. |
|