Windows 10: batch file

Discus and support batch file in Windows 10 Network and Sharing to solve the problem; I want a BAT file to be executed when a USB plugged in to the PC. How can I do it?... Discussion in 'Windows 10 Network and Sharing' started by mary rosebeseos, Nov 28, 2018.

  1. batch file


    I want a BAT file to be executed when a USB plugged in to the PC. How can I do it?

    :)
     
    mary rosebeseos, Nov 28, 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 28, 2018
    #2
  3. Batch Files Knowledge Base

    Very nice and usefull thanks for contributing.
     
    AphexDreamer, Nov 28, 2018
    #3
  4. Steevo Win User

    batch file

    Batch file to ping network

    No, batch files are extremely easy.

    A "If" requires three extra steps.

    Code is not how much you can put in, but how lite can you make it and still perform the functions.

    So

    @ echo off


    ping 1.4.1.4 >a.txt

    findstr /m "Request timed out" a.txt
    if %errorlevel%%==0 (
    echo Save our nets!!!
    )

    pause
     
    Steevo, Nov 28, 2018
    #4
Thema:

batch file

Loading...
  1. batch file - Similar Threads - batch file

  2. How do you pin a batch file created in Notepad to the Start Menu?

    in Windows 10 Gaming
    How do you pin a batch file created in Notepad to the Start Menu?: How do you pin a batch file created in Notepad to the Start Menu? I have the batch file...whatever.bat. What do I do now? I didn't understand other instructions I saw before. Thanks....
  3. How do you pin a batch file created in Notepad to the Start Menu?

    in Windows 10 Software and Apps
    How do you pin a batch file created in Notepad to the Start Menu?: How do you pin a batch file created in Notepad to the Start Menu? I have the batch file...whatever.bat. What do I do now? I didn't understand other instructions I saw before. Thanks....
  4. batch file for making normal window size bigger?

    in Windows 10 Gaming
    batch file for making normal window size bigger?: Is there a simple way, via a batch file, to stretch out the size of the normal window? I know i can maximize it, but then when moving between monitors, it goes back to a really small window....
  5. batch file for making normal window size bigger?

    in Windows 10 Software and Apps
    batch file for making normal window size bigger?: Is there a simple way, via a batch file, to stretch out the size of the normal window? I know i can maximize it, but then when moving between monitors, it goes back to a really small window....
  6. Batch Reset of Windows 11 File Explorer

    in Windows 10 Gaming
    Batch Reset of Windows 11 File Explorer: HiDoes someone know the batch code to reset all the settings of the Windows 11 File Explorer back to its default settings?Or eventually the registry folders/ keys that have to be removed to have it back to default?Thanks for your help....
  7. Batch Reset of Windows 11 File Explorer

    in Windows 10 Software and Apps
    Batch Reset of Windows 11 File Explorer: HiDoes someone know the batch code to reset all the settings of the Windows 11 File Explorer back to its default settings?Or eventually the registry folders/ keys that have to be removed to have it back to default?Thanks for your help....
  8. software publisher batch file

    in Windows 10 Gaming
    software publisher batch file: so im on windows 11 and mi trying to run a batch file to program on but its says to find a version for your pc please check software publisher https://answers.microsoft.com/en-us/windows/forum/all/software-publisher-batch-file/2e85470f-dc67-4afa-957f-4d3ed7128141
  9. software publisher batch file

    in Windows 10 Software and Apps
    software publisher batch file: so im on windows 11 and mi trying to run a batch file to program on but its says to find a version for your pc please check software publisher https://answers.microsoft.com/en-us/windows/forum/all/software-publisher-batch-file/2e85470f-dc67-4afa-957f-4d3ed7128141
  10. How do I revert the actions of this Batch file?

    in Windows 10 Software and Apps
    How do I revert the actions of this Batch file?: I was scouring the internet and came across a batch file that was supposed to restore the windows 8 UAC screen as I prefer it over the newer one. The batch file was meant to be ran using Windows 10 but it didn't specify that. Now when I try to open Registry Editor or run a...

Users found this page by searching for:

  1. script to clean user profiles windows 10 batch cmd