Windows 10: How to loop a software using batch file

Discus and support How to loop a software using batch file in Windows 10 Support to solve the problem; Hi, I have a software that runs from command line, and it needs 2 command windows to run in parallel. So I use a .bat file to start both commands using... Discussion in 'Windows 10 Support' started by Liargoff, May 15, 2021.

  1. Liargoff Win User

    How to loop a software using batch file


    Hi, I have a software that runs from command line, and it needs 2 command windows to run in parallel. So I use a .bat file to start both commands using START. Something like: START program.exe -m method1 START program.exe -m method2 Each method runs for 10 hours then stops and the batch command window closes. How can I run both methods in loops instead of having to restart each manually? Thanks

    :)
     
    Liargoff, May 15, 2021
    #1
  2. oily_17 Win User

    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, May 15, 2021
    #2
  3. Batch Files Knowledge Base

    Very nice and usefull thanks for contributing.
     
    AphexDreamer, May 15, 2021
    #3
  4. How to loop a software using batch file

    Batch file not working

    I'm afraid your batch file suffers from numerous problems. Here is a list of them:

    • I do not understand what the set YYY... is supposed to do.
    • There is no need to create variables for date, time and random. You can use them directly in your code.
    • In some countries, the %time% variable includes colons How to loop a software using batch file :)). They cannot be used in file names. Same for the %date% variable if it includes forward slashes (/).
    • In batch files you MUST fully qualify all file names.
    • "Goto" statements should be avoided as much as possible. Use loops instead (see below).
    • In your copy command you MUST put double quotes around file/folder names that have embedded spaces.

    Here is a cleaned up version of your batch file:

    Code:
    @echo offset YYYYMMDD=%4%%DATE:~4,2%%DATE:~7,2%if exist C:\Output\output.txt (   copy /y C:\Output\output.txt "F:\Locker\SIC by Plawro\outputs\output%date%_%time%_%random%.txt" >nul   timeout 1 >nul)call C:\Tools\outputreinstall.bat
     
    Frederik Long, May 15, 2021
    #4
Thema:

How to loop a software using batch file

Loading...
  1. How to loop a software using batch file - Similar Threads - loop software using

  2. Deleting files using a batch file

    in Windows 10 Gaming
    Deleting files using a batch file: I created a batch file using AI to delete files older than 3 months from a specific folder but the code I received does not work:. Files are dated in DD/MM/YYYY format in the folder.@echo offset "folder=C:\Users\CC\Documents\0Temp"set "cutoffdate="for /f "tokens=1-3 delims=/"...
  3. Deleting files using a batch file

    in Windows 10 Software and Apps
    Deleting files using a batch file: I created a batch file using AI to delete files older than 3 months from a specific folder but the code I received does not work:. Files are dated in DD/MM/YYYY format in the folder.@echo offset "folder=C:\Users\CC\Documents\0Temp"set "cutoffdate="for /f "tokens=1-3 delims=/"...
  4. How to loop a software using batch file

    in Windows 10 Software and Apps
    How to loop a software using batch file: Hi, I have a software that runs from command line, and it needs 2 command windows to run in parallel. So I use a .bat file to start both commands using START. Something like: START program.exe -m method1 START program.exe -m method2 One method runs for 10 hours and the other...
  5. EFTPS Batch Provider Software - Error Occurred within the Batch Provider Software

    in Windows 10 Installation and Upgrade
    EFTPS Batch Provider Software - Error Occurred within the Batch Provider Software: I am having an issue trying to open the batch provider software after recent updates. My laptop was updated to Windows 10 Pro and when I opened the eftps software today it required a software update as well. [ATTACH] I have tried to run it in compatibility mode but I...
  6. Batch files for use in BSOD debugging

    in Windows 10 BSOD Crashes and Debugging
    Batch files for use in BSOD debugging: [img] Warning This thread is for use by the BSOD team ONLY, to store batch files that can be used to collect additional data, fix settings or anything else that is useful in debugging BSOD problems in Windows 10. [img] Information The way I see it working is the first post...
  7. How to Batch Rename files ?

    in Windows 10 Software and Apps
    How to Batch Rename files ?: I have a lot of files i want to give names to. I already found a way to get names into a text I need. So all these names i have in text, i want to give to other files. How do i do this in a batch process ? Currently trying to learn FastStone Image viewer. Seems to be...
  8. Batch Folder and Batch File/Move Software

    in Windows 10 Software and Apps
    Batch Folder and Batch File/Move Software: Looking for recommendations for software that handles automatic batch folder creation according to defined rules. Also looking for software that handles automatic file and folder moving into more than one directory according to selection criteria (size, date, extension,...
  9. How to change visual effects using batch file or registry file?

    in Windows 10 Support
    How to change visual effects using batch file or registry file?: Hi there forum, how do you change the Visual effects using a batch file or registry file. Thanks, Edward. 52995
  10. Any good Batch file renaming software / scripts

    in Windows 10 Support
    Any good Batch file renaming software / scripts: Hi there does anybody have any decent batch file renaming software or scripts. Here's a whole slew of music files from BBC Radio 3 -- what I want is after the word Breakfast in the title to insert date and time (european format YYMMDD.HHMM -24 hr format. Here's what...