Windows 10: Need some help making a short batch file

Discus and support Need some help making a short batch file in Windows 10 Software and Apps to solve the problem; Hi I need help with a rather short batchfile. I need Two actually each with subtle differences.. Batch file A 1-Check the date of the file on a USB... Discussion in 'Windows 10 Software and Apps' started by reddwarf4ever, Nov 24, 2018.

  1. Need some help making a short batch file


    Hi

    I need help with a rather short batchfile.

    I need Two actually each with subtle differences..

    Batch file A

    1-Check the date of the file on a USB pen in folder B is newer than the same file on the PC if it is then replace the file
    2-run a .exe program ( I hope the batch file doesn’t move forward until the .exe program ends)
    3-1-Check the date of the file on a PC pen is newer than the same file on the USB pen Folder A if it is then replace the file

    Batch file B

    1-Check the date of the file on a USB pen in folder A is newer than the same file on the PC if it is then replace the file
    2-run a .exe program ( I hope the batch file doesn’t move forward until the .exe program ends)
    3-1-Check the date of the file on a PC pen is newer than the same file on the USB pen Folder B if it is then replace the file

    the reasoning for this is that Inhave a car theory test Program installed in two computers but want to be able to continue the progress, whichever computer I am using, as the save file is in Appdata, then I can, take this with me to the other PC, the date check is just a precaution, in case the same PC is used for more than one session and the file has not been updated on the othe PC.

    I hope it sounds more complicated than it is.......

    I am assuming that when the .exe is launched in the batch file that the next ‘line’ to backup the file is not executed until the program is terminated.

    thanks in advance

    :)
     
    reddwarf4ever, Nov 24, 2018
    #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, Nov 24, 2018
    #2
  3. Kreij Win User
    need batch file help

    I think you can just use the "Call" command in your batch file.
    The batch file should delay execution until the call command finishes.

    Call myprogram.exe
    Call mysecondprogram.exe

    Haven't done much batch coding lately *Smile Need some help making a short batch file :)
     
    Kreij, Nov 24, 2018
    #3
  4. Need some help making a short batch file

    Batch Files Knowledge Base

    Very nice and usefull thanks for contributing.
     
    AphexDreamer, Nov 24, 2018
    #4
Thema:

Need some help making a short batch file

Loading...
  1. Need some help making a short batch file - Similar Threads - Need help making

  2. Help with a batch file

    in Windows 10 Network and Sharing
    Help with a batch file: I got the batch file to delete Skype-Setup.exe in the specified folder, but then it keeps repeating. Apparently I am missing something in the command.I didn't see anything relevant in forfiles /?C:\WINDOWS\system32>forfiles /P "C:\Users\Robert Allen...
  3. Help with a batch file

    in Windows 10 Software and Apps
    Help with a batch file: I got the batch file to delete Skype-Setup.exe in the specified folder, but then it keeps repeating. Apparently I am missing something in the command.I didn't see anything relevant in forfiles /?C:\WINDOWS\system32>forfiles /P "C:\Users\Robert Allen...
  4. Need help with batch file

    in Windows 10 Support
    Need help with batch file: Hi all, I need a batch file to do the following: If this is the first time the batch is run: Do command one If this is the second, third or fourth time the batch is run: Do command two If this is the fifth time the batch is run: Do command three Start all over again as if the...
  5. Need help to create a batch file

    in Windows 10 Support
    Need help to create a batch file: Hi Folks, I need to create a batch file that automatically takes permissions & delete the following file & folders File:- C:\Windows\System32\SecurityHealthSystray.exe Folders:-...
  6. Some files help needed.

    in Windows 10 Ask Insider
    Some files help needed.: Ok so currently I’m following a tutorial on how to download Minecraft stuff (not important) and I’ve recently wiped and reset my computer and before when I used to download and open the files, from what I can remember they just opened and showed their window but now after the...
  7. Batch File help!

    in Windows 10 Ask Insider
    Batch File help!: I'm trying to run a batch file that scans the network for a set IP range. When I run the commands individually through command prompt they work just fine. I've saved the txt file as both a .cmd, and .bat. I've also ran both as administrator, as well as navigating to the...
  8. Need batch file help

    in Windows 10 Support
    Need batch file help: I want to create a script to start a game at E:\Grand Theft Auto V\PlayGTAV.exe and wait one minute and then open an existing batch file at E:\Grand Theft Auto V\GTAV Hardcore.bat What do I have to add to the following? start /b "" "E:\Grand Theft Auto V\PlayGTAV.exe" start...
  9. Batch File Help

    in Windows 10 Software and Apps
    Batch File Help: I've never dabbled much in batch files, as I've usually been able to find pre-made ones to do what I wanted. We have an application that handles user data backups. It has three services, and at times, one or two of the three don't start automatically. If you stop and start...
  10. Need help with batch file

    in Windows 10 Support
    Need help with batch file: No serious Batch file or scripting experience, so bear with me. We use a site for our business that has to run on IE and has to have the cache cleared a certain way sometimes for it to function. We have to go IE options, uncheck delete history on exit - go to delete...