I have two text files.
First text file is list1.txt and contains the following
539990000
539990001
539990002
539990003
539990004
539990005
539990006
539990007
539990008
539990009
539990010
539990011
539990012
539990013
539990014
539990015
539990016
539990017
539990018
539990019
539990020
539990021
539990022
539990023
539990024
539990025
539990026
539990027
539990028
539990029
539990030
the second text file will contain up to 160 characters in this case for testing it will say
test of smppclient
contents of text.txt
test message
I have an application called smppproxy which I can manually inject messages I am trying to create a batch file to send to a list of numbers ( from a file) as well as use the text as a variable.
So if I want to send the text test message to a given list of numbers ( list1.txt) with the text of (test mesage) I can
or I can change the text by having a different text in the text file.
Below is the information on the smppproxy if that helps. I apologize if I am not making myself clear. I have just been unable to read the text.txt file in as a variable
I have been able to send a message to an entire list of numbers with no trouble with the batch file below. All I am trying to do is add one extra variable for the text
"batch file test" and the text is read from a file
The text also has to be in " "
@echo off
FOR /F "tokens=*" %%I in (C:\Users\Clay\Desktop\batch\list1.txt) do call :smppclient %%I goto :eof
:smppclient
smppclient -u SMPPSMS -p TANSTAAF -a 208.52.110.18/16400 -s 1 -T "batch file test" -O Alerts -D %1 >> bulk.txt
:: DONE
C:\Services\executables>smppclient
Usage:
Option Content Description
------ ------- -----------
-h BOOLEAN(0,1) 1 to print this usage message
-t BOOLEAN(0,1) 1 to enable SMPP Tracing
-pp BOOLEAN(0,1) 1 to enable Optional Parameter Printing
-lp BOOLEAN(0,1) 1 to load Optional Params
-lap BOOLEAN(0,1) 1 to load All Params
-pl VALUE 1 to 8000, Payload length
-lm BOOLEAN(0,1) 1 Send More Message Optional Parameter Value 1
-plt VALUE 0-Default(WAP WDP),1-WCMP
-pf STRING Load the payload from this file name.
-V VALUE 0x34 (Version 3.4)
-X BOOLEAN(0,1) ClientTransmitter = 1 (default)
ClientReceiver = 0
ClientTransceiver = 2
-Q BOOLEAN(0,1) 1 to Suppress output to screen
-k BOOLEAN(0,1) When unbinding, keep the TCP/IP session alive
-u STRING(1..12) Username, Ex: SYSID
-p STRING(1..12) Password, Ex: PASSWORD
-a HOSTNAME/PORT Ex: hostname/9703
-s NUMBER(1..8000) number of Submits
-r NUMBER(1..8000) number of Replaces
-c NUMBER(1..8000) number of Cancels
-data NUMBER(1..8000) number of Data_sm
-sm NUMBER(1..8000) number of Submit multis
-i NUMBER(1..8000) number of Infos
-q NUMBER(1..8000) number of Querys
-l NUMBER(1..8000) number of EnquireLinks
-W NUMBER(1..nnnn) Wait/Delay (milliseconds) between transactions
-rc NUMBER(1..n) Number of retries on connect fault
-rd BOOLEAN(0,1) Registered Delivery (mask)
0x00=None, 0x01:DlvNonDlv 0x02:NonDlv
0x04=DlvAck, 0x08:ManAck 0x10:IntAck
0x20=AlrAck
-ec NUMBER Esm Class, (mask)
0x00=Default 0x01=Datagram
0x02=Transactional 0x03=StoreForward
-rp BOOLEAN(0,1) ReplaceIfPresent 0 = No, 1 = Yes
-rb BOOLEAN(0,1) 0 = No Rebind, 1 = Perform Rebind
-rcon BOOLEAN(0,1) 0 = No Reconnect, 1 = Perform reconnect and rebind
-dm NUMBER(1..n) Default message catalogue number
-vt BOOLEAN(0..1) Generate varied text strings
-T DATA(1..128) Message text
-d DCS/DataCodingScheme
-P NUMBER(0..255) PID/ProtocolId
-R STRING Address range for bind_receiver
-D NUMBER Dest Addr , Default 1230000...
-O NUMBER Orig Addr
-S NUMBER Service Type
-DT STRING DestTypeOfNumber
-OT STRING OrigTypeOfNumber
-DN STRING DestNumberPlan
-ON STRING OrigNumberPlan
-ba STRING Base Dest Address, will be incremented
-bo STRING Base Orig Address, will be incremented
-mp NUMBER Message Priority, 0 = Normal, 1 = Urgent
-mr NUMBER Message Reference - for Query/Cancel
-dt UTC_TIME Deferred Delivery Time UTC_TIME: YYMMDDhhmmssnnp
-et UTC_TIME Message Expiry Time UTC_TIME: YYMMDDhhmmssnnp
-st STRING System Type
-rt NUMBER Set the socket read timeout to NUMBER seconds. The default is no timeout.
-stats Print statistics
-smcount NUMBER(1..8000) number of destinations per submit multi
-ws NUMBER The Bind Transmitter window size. The default is 1
-sp NUMBER WAP Source port
-dp NUMBER WAP Destination port
-ssu NUMBER WAP source subunit
-dsu NUMBER WAP destination subunit
-umr NUMBER User message reference
-mwi NUMBER Set the message waiting flags. The posible values are:
SMPP_MWI_OFF=0x00 - Turn MWI indication off
SMPP_MWI_ON =0x80 - Turn MWI indication on
The MWI ON/OFF values should be ored with these values:
SMPP_MWI_VOICE=0x00 - Voice mail message waiting
SMPP_MWI_FAX=0x01 - Fax message waiting
SMPP_MWI_EMAIL=0x02 - Email message waiting
SMPP_MWI_OTHER=0x03 - Other messaeg waiting
Count - No. of messages waiting [0-254] or 255(unknown)
Format: MWI or MWI,Count,...,MWI,Count
-rxcnt NUMBER messages count a client receiver will receive before sending an Unbind
Examples:
Submit: smppclient -u 987654 -p PSWD -a hostname/5016 -s 10 -T HelloWorld -D 1234567
Replace: smppclient -u 987654 -p PSWD -a hostname/5016 -r 10 -T HelloWorld -D 1234567
Query: smppclient -u 987654 -p PSWD -a hostname/5016 -q 10 -mr 1234...
Delete: smppclient -u 987654 -p PSWD -a hostname/5016 -c 10 -mr 1234...
MWI: smppclient -u 987654 -p PSWD -a hostname/5016 -s 1 -lp 1 -mwi 0x80,0x3,0x82,0x8
[regaining space - attachment deleted by admin]