Batch Files

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have Windows XP SP2 and all the updates. I have recently been fooling
around with Batch files. I have been having problems with them not running
the command.

What happens is I will have a correct command set up in the
batch file but when i run it a cmd window opens and the command it is
supposed to run continously repeats the command over and over. The command
function never actually initiats anything.... nothing ever runs from the
batch file command. It will just keep repeating for ever and ever untill i
close it.

Now here is the thing. If i rename the batch file or move
it from where i was editing it to another folder it will run just fine. But
see the issue is... I dont want have to rename it or move it. I want it to
just run like it is supposed to.

Any ideas?
 
Neemers said:
I have Windows XP SP2 and all the updates. I have recently been fooling
around with Batch files. I have been having problems with them not
running
the command.

What happens is I will have a correct command set up in the
batch file but when i run it a cmd window opens and the command it is
supposed to run continously repeats the command over and over. The
command
function never actually initiats anything.... nothing ever runs from the
batch file command. It will just keep repeating for ever and ever untill
i
close it.

Now here is the thing. If i rename the batch file or move
it from where i was editing it to another folder it will run just fine.
But
see the issue is... I dont want have to rename it or move it. I want it to
just run like it is supposed to.

Any ideas?


Try asking in alt.msdos.batch.nt and include such minor details as your PATH
and the batch file name and contents and any error messages produced.

HTH

....Bill
 
Neemers said:
I have Windows XP SP2 and all the updates. I have recently
been fooling around with Batch files. I have been having
problems with them not running the command.

What happens is I will have a correct command
set up in the batch file but when i run it a cmd window
opens and the command it is supposed to run continously
repeats the command over and over. The command function
never actually initiats anything.... nothing ever runs from
the batch file command. It will just keep repeating for
ever and ever untill i close it.

Now here is the thing. If i rename the batch
file or move it from where i was editing it to another
folder it will run just fine. But see the issue is... I
dont want have to rename it or move it. I want it to just
run like it is supposed to.

Any ideas?

That often happens when your batch file has the same name as
the command that it contains. Try including the file extension
along with the command. For example, this command, xcopy
C:\Folder1 D:\, in a batch file saved as xcopy.bat will produce
the results you're seeing. This command, xcopy.exe C:\Folder1
D:\, will run correctly. Start adding the .exe and .com file
extensions and you should be OK.

Good luck

Nepatsfan
 

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

Back
Top