rpscar
19th April 2019, 09:14
Hello Everyone,
Hope all doing well.
I have a requirement that I have to open the script from each folder from server and read the file, if we found the string then capture the value and pass it to the report. simply I can say search script items How will it works. If anyone have Search script items please send me.
Thanks in advance!!!
Regards,
Raj
mark_h
22nd April 2019, 03:09
Are you searching for like baan script files or something along those lines?
rpscar
2nd May 2019, 10:23
I have to open each file search in each line , if the given string found we have to store in a file.
mark_h
2nd May 2019, 17:51
Well here is a thread on http://www.baanboard.com/baanboard/showthread.php?t=71880 - basically reading a directory of files. Then you can open each file and read one line at a time search for a string. Then use the POS command to search the record you just read - if you find a line containing the string you can then output(or write) the file. You could then close the file move on to the next file or if needed keep reading the current file for more occurrences. I do not have a script that does what you are looking for.
I have a requirement that I have to open the script from each folder from server and read the file, if we found the string then capture the value and pass it to the report. simply I can say search script items How will it works. If anyone have Search script items please send me.
Raj,
Refer to the threads for the sample code to get the list of files from the directory and the pattern.in.file() usage -
reading Ascii file (http://www.baanboard.com/baanboard/showthread.php?t=7414)
Maximum number of records to be inserted with 1 commit (http://www.baanboard.com/baanboard/showthread.php?t=14992&highlight=pattern.in.file)
rpscar
6th May 2019, 12:58
Thank you Mark_K and NPRao