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. Getting the file size on disk from command line

    in Windows 10 Ask Insider
    Getting the file size on disk from command line: I'm not sure if this is the correct place but it was the closest and most populated subreddit. I need to find actual disk space of a file, to figure out the downloaded ratio of torrent files. I know it can be seen in file properties and there are ways to get reserved space...
  3. 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...
  4. 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...
  5. Deleting files with command line

    in Windows 10 Network and Sharing
    Deleting files with command line: I used del filename and it was successfully deleted. I also used dir to double check. However, when I checked the Recycle Bin; the file wasn't found inside. Was this file permanently deleted?...
  6. Win10 2016 LTSB "Access Denied" for "NET" command line (and batch files)

    in Windows 10 Customization
    Win10 2016 LTSB "Access Denied" for "NET" command line (and batch files): To fix "System Error 5" & "Access Denied" result when running the "net" utility from a command line or batch file, I needed to modify the following "User Account Control:" settings in Group Policy (type "Group Policy" at start menu to edit it): [ATTACH] I'm not sure which...
  7. 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...
  8. 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...
  9. 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...
  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