neemers

Distinguished
Jul 14, 2005
28
0
18,530
Archived from groups: microsoft.public.windowsxp.general (More info?)

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?
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.general (More info?)

Neemers wrote:
> 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
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.general (More info?)

"Neemers" <Neemers@discussions.microsoft.com> wrote in message
news:8241A96A-B6C6-4368-B83B-E2C5470DC1B9@microsoft.com...
>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
 

TRENDING THREADS