SOLVED Batch file won't tun


Joined
Sep 27, 2020
Messages
3
Reaction score
0
I’ve been using batch files for many years: Prepare a text file. Change its extension to .BAT. Click and the batch file runs.

Now with Windows 10 64 bit I find that doesn’t work. It seems the system just won’t recognise that this is a batch file and so doesn’t run it. I’ve tried with extension.CMD, and tried from the command prompt.

How do I solve this?
 
Ad

Advertisements

Joined
Oct 2, 2014
Messages
1,510
Reaction score
328
Did you run the command prompt as admin (right click on the command prompt icon, and select "run as admin")? You should be able to run the .bat file by typing the path. I have to admit, I haven't run a batch file since Windows 7, but there's no reason it shouldn't work in 10.
 
Joined
Sep 27, 2020
Messages
3
Reaction score
0
Thanks, I've done that running as admin now, but I still get this message:
xyz.bat is not recognized as an internal or external command, operable program or batch file

Same with cmd.

BTW Formerly when I changed the text file's extension to bat before running it, I always got a message 'Are you sure?'
Now there is no such message, as if the system was changing the extension but not changing the file's type to batch file.
 
Joined
Mar 7, 2020
Messages
178
Reaction score
20
As you have used batch files for years, that you checked that file/program the .bat file refers too is currently saved on the "C" drive of your computer.
 
Joined
Sep 26, 2017
Messages
2,238
Reaction score
428
I'm not having any issue running creating and running simple .bat files on the latest Win10.
 
Joined
Feb 22, 2014
Messages
1,479
Reaction score
295
Two things I can think of in addition to what has been mentioned.
  1. Check file associations for bat/cmd
  2. Check that the bat/cmd is saved as text only and not saved with a special format.
 
Ad

Advertisements

Joined
Sep 27, 2020
Messages
3
Reaction score
0
This is what I've now found:
Make your batch file with Notepad++ and it will run.
Make your batch file with Word saved as text or with Wordpad or with anything else, and it won't run.
My experience.
 
Ad

Advertisements

Joined
Feb 22, 2014
Messages
1,479
Reaction score
295
I only use Wordpad and have no issues. Just have to make sure it is strictly text without formatting.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top