Windows 10: batch if command

Discus and support batch if command in Windows 10 Software and Apps to solve the problem; I guess this is the age of the bat scripts ---- this expression fails even if the computer name is fpe1002 — it is actualy FPE1002 if /I... Discussion in 'Windows 10 Software and Apps' started by fpefpe, Jun 5, 2025 at 4:42 PM.

  1. fpefpe Win User

    batch if command


    I guess this is the age of the bat scripts ---- this expression fails even if the computer name is fpe1002 — it is actualy FPE1002 if /I [%computername%] == [fpe1002] set sd=shd01 c:\Editors else set sd=but this express succeeds with the computer name as FPE1002 set sd=if /I [%computername%] == [fpe100

    :)
     
  2. Naki Win User

    GPU-Z what command line parameter ?

    Suggestion: /? (-?) and /help (-help) command-line arguments to show a list of all possible arguments in a small window. *Smile batch if command :)
     
  3. ryanly Win User
    GPU-Z what command line parameter ?

    Current /? (-?) or / help (-help) parameter is invalid
     
  4. batch if command

    Batch File Command???

    Hey, how you doing?

    Thank you for contacting us and welcome to the Microsoft Community.

    My name is Vitor. I'm an Independent Advisor and I'll be glad to help you today.

    To run a batch file that starts a backup program and waits for it to complete before executing the next command, you can use the `START /WAIT` command in your batch script. Here's an example of how you can structure your batch file:

    @Echo off

    echo Starting backup program...

    START /WAIT "Backup Program" "path\to\backup\program.exe"

    echo Backup program has completed.

    REM Add more commands to run after the backup program completes.

    Replace `"path\to\backup\program.exe"` with the actual path to your backup program executable.

    Explanation:

    - `@echo off`: This command prevents the display of the commands themselves while the batch file is running.

    - `echo Starting backup program...`: This line is just an informational message to show that the backup program is being started.

    - `START /WAIT "Backup Program" "path\to\backup\program.exe"`: This line starts the backup program using the `START` command with the `/WAIT` switch. The `/WAIT` switch ensures that the batch file waits for the backup program to finish before proceeding to the next command.

    - `echo Backup program has completed.`: This line indicates that the backup program has finished.

    - `REM Add more commands to run after the backup program completes.`: You can add any additional commands you want to run after the backup program finishes.

    Save the batch file with a `.bat` extension and run it. The batch script will start the backup program and wait for it to complete before moving on to the next command in the batch file.

    Hope the above information helps. Reply with necessary information and the result to help you further.

    Thanks

    Vitor S.
     
    {VitorLima}, Jun 5, 2025 at 9:59 PM
    #4
Thema:

batch if command

Loading...
  1. batch if command - Similar Threads - batch command

  2. batch if command

    in Windows 10 Gaming
    batch if command: I guess this is the age of the bat scripts ---- this expression fails even if the computer name is fpe1002 — it is actualy FPE1002 if /I [%computername%] == [fpe1002] set sd=shd01 c:\Editors else set sd=but this express succeeds with the computer name as FPE1002 set...
  3. batch if command

    in Windows 10 Customization
    batch if command: I guess this is the age of the bat scripts ---- this expression fails even if the computer name is fpe1002 — it is actualy FPE1002 if /I [%computername%] == [fpe1002] set sd=shd01 c:\Editors else set sd=but this express succeeds with the computer name as FPE1002 set...
  4. 'netsh' is not recognized as an internal or external command, operable program or batch...

    in Windows 10 Software and Apps
    'netsh' is not recognized as an internal or external command, operable program or batch...: Does anyone know the fix to this? I just randomly opened my laptop one day and it started doing this.I've tried like most fixes I've seen on the internet so I just came here to see if anyone knows how to fix this....
  5. 'netsh' is not recognized as an internal or external command, operable program or batch...

    in Windows 10 Customization
    'netsh' is not recognized as an internal or external command, operable program or batch...: Does anyone know the fix to this? I just randomly opened my laptop one day and it started doing this.I've tried like most fixes I've seen on the internet so I just came here to see if anyone knows how to fix this....
  6. 'netsh' is not recognized as an internal or external command, operable program or batch...

    in Windows 10 Gaming
    'netsh' is not recognized as an internal or external command, operable program or batch...: Does anyone know the fix to this? I just randomly opened my laptop one day and it started doing this.I've tried like most fixes I've seen on the internet so I just came here to see if anyone knows how to fix this....
  7. Why do I get "access denied" when I try to run commands from file through a batch script?

    in Windows 10 BSOD Crashes and Debugging
    Why do I get "access denied" when I try to run commands from file through a batch script?: I am trying to write a script that should run some commands from a file specifically commands for pg_dump and pg_restore, or backup and restore of Postgres database, but I am receiving an "access denied" output.The script looks like this:@echo offrem enters postgres directory...
  8. Why do I get "access denied" when I try to run commands from file through a batch script?

    in Windows 10 Gaming
    Why do I get "access denied" when I try to run commands from file through a batch script?: I am trying to write a script that should run some commands from a file specifically commands for pg_dump and pg_restore, or backup and restore of Postgres database, but I am receiving an "access denied" output.The script looks like this:@echo offrem enters postgres directory...
  9. Why do I get "access denied" when I try to run commands from file through a batch script?

    in Windows 10 Software and Apps
    Why do I get "access denied" when I try to run commands from file through a batch script?: I am trying to write a script that should run some commands from a file specifically commands for pg_dump and pg_restore, or backup and restore of Postgres database, but I am receiving an "access denied" output.The script looks like this:@echo offrem enters postgres directory...
  10. What word is used for internal command or operable program or batch file

    in Windows 10 Software and Apps
    What word is used for internal command or operable program or batch file: I want to set the command program on my laptop https://answers.microsoft.com/en-us/windows/forum/all/what-word-is-used-for-internal-command-or-operable/6ede701f-e0a3-49b2-8631-c7290604db2c