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 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
  3. 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]...
  4. can a command line action as batch file

    in Windows 10 Support
    can a command line action as batch file: I have a run a action on one of my programs to disable it (when required) quite regularly from an elevated cmd prompt... Can it be made into a bath file (.bat) and executed as and when required? 174187
  5. 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...
  6. run a powershell command like a batch file

    in Windows 10 Installation and Upgrade
    run a powershell command like a batch file: I am working as a temp on a Windows 7 to Windows 10 migration team. We've encountered a problem with some software, and a solution has been found that requires us to execute a a single command with PowerShell. However, the command is extremely long and complex, and very...
  7. 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...
  8. Using variables with the rename command in a batch file

    in Windows 10 Network and Sharing
    Using variables with the rename command in a batch file: Hello, I am trying to use variables in renaming a robocopy log file but I continually receive a 'syntax error'. Everything works perfectly until I use the rename command. I am using the latest build of Windows 10. Any advice will be appreciated, thank you. The batch...
  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