Windows 10: How to run a simple batch file in windows 10

Discus and support How to run a simple batch file in windows 10 in Windows 10 Software and Apps to solve the problem; For years, from Windows3.1 to Windows7 I have been able to run simple batch files like something.bat It always executed without any problems.Fast... Discussion in 'Windows 10 Software and Apps' started by Adri-wens, Jul 30, 2024.

  1. Adri-wens Win User

    How to run a simple batch file in windows 10


    For years, from Windows3.1 to Windows7 I have been able to run simple batch files like something.bat It always executed without any problems.Fast forward to Windows10 pro 22H2 , it does not work anymore : On clicking the 'something.bat' , it shows the same as 'something.txt' -->IOW I just get the text file, but no execution of the .bat file , I have no idea how to fix this, Using ADMIN is no go either. This is driving me nutsAnyone please??

    :)
     
    Adri-wens, Jul 30, 2024
    #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, Jul 30, 2024
    #2
  3. Batch Files Knowledge Base

    Very nice and usefull thanks for contributing.
     
    AphexDreamer, Jul 30, 2024
    #3
  4. Ethan B. Win User

    How to run a simple batch file in windows 10

    Install certificates in intermediate/root stores by batch file?

    Hi GabeinSoCal,

    Just a simple troubleshooting step, really. Have you tried running the batch file as an administrator, so the elevated privileges can carry over to certmgr? (right-click the batch file, click Run as administrator)
     
    Ethan B., Jul 30, 2024
    #4
Thema:

How to run a simple batch file in windows 10

Loading...
  1. How to run a simple batch file in windows 10 - Similar Threads - run simple batch

  2. Simple batch file gets syntax error

    in Windows 10 Gaming
    Simple batch file gets syntax error: My one-line batch file gets the error message :The syntax of the command is incorrect. I'm pretty sure this is not so.As in so many many other cases, Microsoft gives a generic error message that has no apparent connection to what the user is trying to do. As a result, we...
  3. Simple batch file gets syntax error

    in Windows 10 Software and Apps
    Simple batch file gets syntax error: My one-line batch file gets the error message :The syntax of the command is incorrect. I'm pretty sure this is not so.As in so many many other cases, Microsoft gives a generic error message that has no apparent connection to what the user is trying to do. As a result, we...
  4. How to run a simple batch file in windows 10

    in Windows 10 Gaming
    How to run a simple batch file in windows 10: For years, from Windows3.1 to Windows7 I have been able to run simple batch files like something.bat It always executed without any problems.Fast forward to Windows10 pro 22H2 , it does not work anymore : On clicking the 'something.bat' , it shows the same as 'something.txt'...
  5. How to run a simple batch file in windows 10

    in Windows 10 Network and Sharing
    How to run a simple batch file in windows 10: For years, from Windows3.1 to Windows7 I have been able to run simple batch files like something.bat It always executed without any problems.Fast forward to Windows10 pro 22H2 , it does not work anymore : On clicking the 'something.bat' , it shows the same as 'something.txt'...
  6. How to run a Windows Apps shortcut in a batch file?

    in Windows 10 Network and Sharing
    How to run a Windows Apps shortcut in a batch file?: Hi,I'm trying to open a couple of programs OBS and the Minecraft Launcher in a batch file that I will then make a shortcut for so I can launch them with one press of a key on my Num Pad. I was wondering how I could open the Minecraft Launcher in this batch file? The issue...
  7. How to run a Windows Apps shortcut in a batch file?

    in Windows 10 Gaming
    How to run a Windows Apps shortcut in a batch file?: Hi,I'm trying to open a couple of programs OBS and the Minecraft Launcher in a batch file that I will then make a shortcut for so I can launch them with one press of a key on my Num Pad. I was wondering how I could open the Minecraft Launcher in this batch file? The issue...
  8. A simple batch file...?

    in Windows 10 Network and Sharing
    A simple batch file...?: Hi, It's been a while since I delved into the depths of Windows - and long before Windows 10 - but I would like to write a batch file to copy files from a folder on my Windows 10 PC to 2 separate folders - one on an SD card and the other on an external hard drive (I have...
  9. Simple batch file driving me nuts

    in Windows 10 Software and Apps
    Simple batch file driving me nuts: All I want to do is check if a folder exists on a network share and if it does, copy a file to it. Should be a piece of cake. Here is my code: Code: @echo on set "newFile=Just a test file.txt" set "hostTarget=\\Kfwserver\HP_D\ShowkeyPlus Data\" if exists "%hostTarget%" copy...
  10. How to run batch file with powershell

    in Windows 10 Network and Sharing
    How to run batch file with powershell: I created a basic batch file that uses "net share" to share a local path. I saved the batch file. When I double click the file I get "access is denied"... note, I am logged on as a admin. Anyways... I figure it has to be run using power shell. I do not know much about...