Windows 10: Batch File Command???

Discus and support Batch File Command??? in Windows 10 Software and Apps to solve the problem; I want to run a batch file that starts a backup program, but does not execute the next command until that program completes? How do I do this?... Discussion in 'Windows 10 Software and Apps' started by W-Wolfe, Aug 9, 2023.

  1. W-Wolfe Win User

    Batch File Command???


    I want to run a batch file that starts a backup program, but does not execute the next command until that program completes? How do I do this?

    :)
     
    W-Wolfe, Aug 9, 2023
    #1

  2. Batch file

    thank you for your reply. how to merge the codes so that the batch file does this

    the batch file displays the options below

    1. open the *.spl file in notepad
    2. delete the *.shd and *.spl files
    3.exit

    commands execute as options are selected
     
    Sandeep Bhugoo, Aug 9, 2023
    #2
  3. chasw98 Win User
    DOS Command issued from Batch file

    I have been running a batch file to list my personal file, and output the listing to a text file in a folder (dv7).

    Folder is on same level as Bat file.

    I then use the text file to compare to files on another computer or external drive, as backup.

    For some reason it no longer works.

    The command in the BAT file is:

    @dir "C:\Users\Sales\Zonal\" /o:gn /s /t:w> "C:\Users\Sales\Desktop\For BATCH\dv7\"

    To demo the problem, I included two additional commands - results is in screen capture.

    @dir "C:\Users\Sales\Zonal\"

    @dir "C:\Users\Sales\Desktop\For BATCH\dv7\"

    @dir "C:\Users\Sales\Zonal\" /o:gn /s /t:w> "C:\Users\Sales\Desktop\For BATCH\dv7\"

    Pause Check for errors

    Pic = note the directories are found. and then not found. Why?


    Batch File Command??? 207e9d3e-335f-4e08-b9a9-44e75480e062?upload=true.jpg
     
    chasw98, Aug 9, 2023
    #3
  4. oily_17 Win User

    Batch File Command???

    Batch Files Knowledge Base

    Don't use batch files very much but one I find useful is for creating a list of files in a directory.
    Just copy the text below into Notepad and save as Filelist.bat

    dir /a /-p /o:gen >filelist.txt

    When you run it from a folder it will create a Filelist.txt file,in the same folder, that lists all the files in that folder.Useful when you are too lazy to type all the files out yourself.
     
    oily_17, Aug 9, 2023
    #4
Thema:

Batch File Command???

Loading...
  1. Batch File Command??? - Similar Threads - Batch File 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 Software and Apps
    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. 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...
  5. Batch File Command???

    in Windows 10 Gaming
    Batch File Command???: I want to run a batch file that starts a backup program, but does not execute the next command until that program completes? How do I do this? https://answers.microsoft.com/en-us/windows/forum/all/batch-file-command/3af2ce6b-ace3-43cb-b6fb-5cbff8998736
  6. Command Prompt/ Batch files

    in Windows 10 Ask Insider
    Command Prompt/ Batch files: [ATTACH] when i create a batch file to ping something, it spams the command and throws no response. how do i fix this? https://preview.redd.it/fyy6qwrfx7n61.png?width=256&format=png&auto=webp&s=d55552fdc7a5c297d565617f710992048238660c submitted by /u/xWasss [link]...
  7. HOW: Robocopy command to a batch-file

    in Windows 10 Network and Sharing
    HOW: Robocopy command to a batch-file: This working fine in a Command Prompt: robocopy "C:\¤Head Folder\Folder 01\Old folder" "C:\¤Head Folder\Folder 01\New folder" /mov /minage:930 How do I make a Batch file .BAT with that RoboCopy command...
  8. Batch commands

    in Windows 10 Network and Sharing
    Batch commands: I know this stuff is kind of old tech, but would anyone know how to make a script that goes through the contents of a folder or file and uses them as command-line arguments say in pseudocode it might look something like: for each item in Desktop, copy %name% to D:\ a USB...
  9. DOS Command issued from Batch file

    in Windows 10 Network and Sharing
    DOS Command issued from Batch file: I have been running a batch file to list my personal file, and output the listing to a text file in a folder dv7. I then use the text file to compare to files on another computer or external drive, as backup. For some reason it no longer works. The command in the BAT file...
  10. Batch file hide command window

    in Windows 10 Support
    Batch file hide command window: I have a batch command to back up a subdirectory: xcopy "C:\All\*" "E:\Allback\*" /E /Q How can I hide the command window during the execution? 40984