Problem with 2-way sms

Problem with 2-way sms SearchSearch
Author Message
steven Randell
Unregistered guest
Posted on Saturday, December 13, 2003 - 08:43 pm:   

I want to use the 2way sms function to send data thru sms grabbeb from a txt file.

Using head.exe -n 5(linux) it's possible on xp to send the first 5 lines stored in txt file

let's say I added all files in a "test" folder and have my data stored in data.txt.

the command:

c:\windows\system32\cmd /c c:\test\head.exe -n 5 c:\test\data.txt

should have to send me the first 5 lines from data.txt. But.. for some reasen I don't even recieve anything back anymore at the moment, few days ago this was working fine.

Don't know what I did wrong, sms's are recieved in the sms-in folder.

When I point to a wrong file, for ex:

c:\windows\system32\cmd /c c:\test\head.exe -n 5 c:\test\blabla.txt

I do recieve the error message back to my GSM:

head: c:\test\blabla.txt cannot find desired file

What am I doing wrong ?
thx
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 1390
Registered: 10-2002
Posted on Monday, December 15, 2003 - 09:45 pm:   

I'd suggest trying to execute the program directly, without loading the secondary command processor.

For example, just:

c:\test\head.exe -n 5 c:\test\blabla.txt

Our echo example loads the command processor, because ECHO is a command that is built into the command processor.

That said, it can also depend on how the application writes to the screen. If the application writes to standard output (stdout) or standard error (stderr), then we should see the response. But if for some reason the application decided to open a fresh console handle, we would not see its output.

Try this from the command line:


c:\test\head.exe -n 5 c:\test\blabla.txt > output.txt

Does this result in the data being written to output.txt? If yes, then the application is using stdout, and we should be able to trap the response.

If no, then the application opens its own console handle, and it won't work.

-bn