Windows 10: Batch command to include random line from file?

Discus and support Batch command to include random line from file? in Windows 10 Support to solve the problem; Hello, i was wondering if i can include random line from file into a Windows 10 batch script command. Command is: wmic computersystem where... Discussion in 'Windows 10 Support' started by postcd, Sep 18, 2020.

  1. postcd Win User

    Batch command to include random line from file?


    Hello,

    i was wondering if i can include random line from file into a Windows 10 batch script command.
    Command is:
    and instead of "Computer%RANDOM%" i would like to input random line from file C:\names.txt
    I have found Batch tool to fetch unique random line(s) from a text file

    Initial question is in this thread.

    :)
     
    postcd, Sep 18, 2020
    #1
  2. Naki Win User

    GPU-Z what command line parameter ?

    Suggestion: /? (-?) and /help (-help) command-line arguments to show a list of all possible arguments in a small window. *Smile Batch command to include random line from file? :)
     
  3. ryanly Win User
    GPU-Z what command line parameter ?

    Current /? (-?) or / help (-help) parameter is invalid
     
    ryanly, Sep 18, 2020
    #3
  4. Batch command to include random line from file?

    How can a batch file do this?!

    did you see this answer taken from stackoverflow ? :

     
    blobster21, Sep 18, 2020
    #4
Thema:

Batch command to include random line from file?

Loading...
  1. Batch command to include random line from file? - Similar Threads - Batch command include

  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. Batch File Command???

    in Windows 10 Software and Apps
    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
  4. 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]...
  5. 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
  6. 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...
  7. 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...
  8. Command Line and Batch - Start Command [/D Path] option ignored

    in Windows 10 BSOD Crashes and Debugging
    Command Line and Batch - Start Command [/D Path] option ignored: In a batch file using the start command [/D Path] option is ignored example: D:\TempJDK>START "Work Damn It" /b /d ".\temp" /MIN /HIGH testRun.bat The system cannot find the file testRun.bat. Here "temp" is a sub folder of the current directory. The /d ".\temp" option is...
  9. Running a Command Line Command From a File Automatically

    in Windows 10 Installation and Upgrade
    Running a Command Line Command From a File Automatically: I have the following commands which need to be run in the command line: sc.exe config wuauserv start= disabled sc.exe stop wuauserv I want to create a file which, when launched, opens the command line, sends the above commands to the command line, and then closes the...
  10. Include date in file created by batch file.

    in Windows 10 Support
    Include date in file created by batch file.: How can I add to this batch command to include the date: xcopy C:\all\* Z:\Allbak\* /E /Y /C I'd like the resulting file to be named "Z:\Allbak171129" (yr mo day). The plan is to set up a task schedule to run the batch file every week. I want to keep several previous...