How to combine "|" character in run () command in powerbuilder in order to read an txt file as metad
- by sgian76
Could you please tell me how to use "pdftk mypdf.pdf dump data | findstr NumberOfPages in powerbuilder run command and save this metadata in a file by using the following code like this:
string ls_runinput, ls_outputfile
ls_outputfile = "c:\test.exe"
ls_runinput = "c:\pdftk\pdftk.exe mypdf.pdf dump_data | findstr NumberOfPages >"+ls_outputfile
Run(ls_runinput,Minimized!)
li_fileopen = FileOpen(ls_outputfile ,TextMode!, Read!, Shared!)
The problem is that Run command is executed, the file is created, but fileopen return -1 ?
Is it maybe that run cannot recognize the "|" character?
What should you propose me to write the right code?
Iam using powerbuilder 10.5.2 , Thanks very much in advance