Discussion Locked

Can you obtain a PID in a AT list ?

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Is is possible to collect a PID from a AT command list. If you use the example below:
C:\>at
Status ID Day Time Command Line
-------------------------------------------------------------------------------
1692 Today 7:15 AM "copy c:\ron.txt c:\ron2.txt"

If I have multiple entries in the AT command list, and I want to remove 1 certain entry automatically via a batch file, how can I collect the PID # to delete it from the AT list ? Not a problem if I know the PID #. You cannot delete an entry via the command line in the AT list.
So in the example above, I know I can delete this entry by typing in "at 1692 /del",By getting the PID this way:
"C:\>at|grep ron.txt
1692Today 7:15 AM "copy c:\ron.txt c:\ron2.txt"

Since the PID's in the AT list, do not show up in pstat, I need to know if it is possible to find a PID # from a certain entry in the AT command list, so I can delete a errored or hung AT process.

Thank You.

1 reply

by lo

Hi - What you have is on the track. Now you need a utility that will return the first element of the line. That you can put into an env var or just create a batch file with that as the value.

If worse comes to worse, you can write (or have someone write one). Should be a UNIX/Linux port (like grep) that will do this but I don't know either well enough to know.

This discussion is closed to new replies.