Discussion:
bat code help
(too old to reply)
John Sowden
2014-06-13 05:00:52 UTC
Permalink
I use foxpro on a network to write error messages. when I boot my
computer in my office, I have a bat prog that allows me to see all of
the .err files on the remote computers on the lan. My code allows me to
view the file, by selecting it from the select list, but I want to
selectively delete the file I just viewed. I thought I read in the doc
(I am using v7.5 still) that I could run a program in the select line,
or a batch file. I would like to run a subroutine in my program so I
can view and answer a yn to delete or not. I could not find anything in
the help system or the examples.btm file.

Thoughts?

John
Stan Brown
2014-06-13 08:09:36 UTC
Permalink
Post by John Sowden
I use foxpro on a network to write error messages. when I boot my
computer in my office, I have a bat prog that allows me to see all of
the .err files on the remote computers on the lan. My code allows me to
view the file, by selecting it from the select list, but I want to
selectively delete the file I just viewed. I thought I read in the doc
(I am using v7.5 still) that I could run a program in the select line,
or a batch file. I would like to run a subroutine in my program so I
can view and answer a yn to delete or not. I could not find anything in
the help system or the examples.btm file.
Your description is not very clear, but you can certainly run a
subroutine. See the GOSUB command.
--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com
Shikata ga nai...
CRNG
2014-06-13 11:10:34 UTC
Permalink
On Fri, 13 Jun 2014 04:09:36 -0400, Stan Brown
Post by Stan Brown
Post by John Sowden
I use foxpro on a network to write error messages. when I boot my
computer in my office, I have a bat prog that allows me to see all of
the .err files on the remote computers on the lan. My code allows me to
view the file, by selecting it from the select list, but I want to
selectively delete the file I just viewed. I thought I read in the doc
(I am using v7.5 still) that I could run a program in the select line,
or a batch file. I would like to run a subroutine in my program so I
can view and answer a yn to delete or not. I could not find anything in
the help system or the examples.btm file.
Your description is not very clear, but you can certainly run a
subroutine. See the GOSUB command.
I'm not sure I understand how you are doing the viewing. You can view
a file with the LIST command which allows you to delete the file you
are viewing with the DELETE key. For example if you

LIST *.txt

you will be able to view all the .txt files and delete any of them.
--
Web based forums are like subscribing to 10 different newspapers
and having to visit 10 different news stands to pickup each one.
Email list-server groups and USENET are like having all of those
newspapers delivered to your door every morning.
John Sowden
2014-06-14 00:41:23 UTC
Permalink
Post by Stan Brown
Post by John Sowden
I use foxpro on a network to write error messages. when I boot my
computer in my office, I have a bat prog that allows me to see all of
the .err files on the remote computers on the lan. My code allows me to
view the file, by selecting it from the select list, but I want to
selectively delete the file I just viewed. I thought I read in the doc
(I am using v7.5 still) that I could run a program in the select line,
or a batch file. I would like to run a subroutine in my program so I
can view and answer a yn to delete or not. I could not find anything in
the help system or the examples.btm file.
Your description is not very clear, but you can certainly run a
subroutine. See the GOSUB command.
That is what I would like to do, but I could not find in the doc "how
to" insert a gosub (subname) in the select command line instead of a
program name, such as edit or list

John
Klaus Meinhard
2014-06-16 07:05:45 UTC
Permalink
Hallo John,
Post by John Sowden
That is what I would like to do, but I could not find in the doc "how
to" insert a gosub (subname) in the select command line instead of a
program name, such as edit or list
Take a look at the @select function. Use SET to put your selected file
into a variable, and from then its pretty straightforward.
--
Herzliche Grüße,

* Klaus Meinhard *
Loading...