Windows 10: Batch File help!

Discus and support Batch File help! in Windows 10 Ask Insider to solve the problem; 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... Discussion in 'Windows 10 Ask Insider' started by /u/DTC_Zombie, Jan 17, 2020.

  1. 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 location of the file and attempted to run it thru cmd prompt directly, and still didn't work, below are the cmd i have saved into a bat file that im trying to run. The X's are omitted data for security reasons.

    echo Please wait while data is being compiled... for /l %i in (1,1,255) do @ping x.x.x.%i -n 1 -w 100 | find "Reply" for /l %i in (0,1,255) do @ping x.x.x.%i -n 1 -w 100 | find "Reply" for /l %i in (0,1,255) do @ping x.x.x.%i -n 1 -w 100 | find "Reply" for /l %i in (0,1,254) do @ping x.x.x.%i -n 1 -w 100 | find "Reply" pause
    submitted by /u/DTC_Zombie
    [link] [comments]

    :)
     
    /u/DTC_Zombie, Jan 17, 2020
    #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, Jan 17, 2020
    #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 Batch File help! :)
     
    Kreij, Jan 17, 2020
    #3
  4. Batch File help!

    Batch Files Knowledge Base

    Very nice and usefull thanks for contributing.
     
    AphexDreamer, Jan 17, 2020
    #4
Thema:

Batch File help!

Loading...
  1. Batch File help! - Similar Threads - Batch File help

  2. Batch Files

    in Windows 10 Network and Sharing
    Batch Files: I cannot remember how to open a FILE browser in batch, i was trying to create something were it opens a file browser, and the file you click on, gets deleted. https://answers.microsoft.com/en-us/windows/forum/all/batch-files/335a0e0d-62b0-4615-b303-4a7bb548cc6c"
  3. Batch File Creation Help to change folder icons.

    in Windows 10 Software and Apps
    Batch File Creation Help to change folder icons.: Hey all. I recently upgraded to Win 10. On my old 7 setup, in my movie collection folder, the movie folder icons were images of the movies renamed to "folder". Everything worked well. Since the upgrade, Windows 10 crops the images named "folder" and it no longer works well. I...
  4. 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...
  5. batch file

    in Windows 10 Network and Sharing
    batch file: I want a BAT file to be executed when a USB plugged in to the PC. How can I do it? https://answers.microsoft.com/en-us/windows/forum/all/batch-file/1af5ec02-b6c8-4916-959b-ed0327a964e7"
  6. Need some help making a short batch file

    in Windows 10 Software and Apps
    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...
  7. Batch File Problem

    in Windows 10 Support
    Batch File Problem: So I want to backup my saved game files after each time I play, as there is a bug after the latest patch that can delete your saves. Figured better to be safe then sorry. Now I found the following online and edited to my info... Code: @echo off cd "D:\Must Keep\Game & Other...
  8. 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...
  9. Startup batch file

    in Windows 10 Support
    Startup batch file: When Windows 10 starts, a DOS window appears, runs: C:\Users\Brian\AppData\Local\854e8f7.bat , then disappears. The .bat file contains: start "plqcknRlU67iM4TfEXQq" "%LOCALAPPDATA%\b183312\88d4f24.21b2bbd3" There are two files in C:\Users\Brian\AppData\Local\...
  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...