07-14-2006 7:18 AM
Dear All,
I am working on object, which had requirement to Pick the file from application server.
The Application server contain the files in /temp/sms/ directory. The files are having the name Like smsqry_yyyymmddhhmmss.txt and I have to Pick the Latest file (Base on file name for eg. 'smsqry_20060713102333) from that all and after getting the file I have to delete the file from application server.
So How to do this.
Regards
07-14-2006 7:32 AM
Hello,
Whenever you generate the file on the application server, store the name of the file in on database table or memory. Later on retrive the name and read your file from application server.
To delete the file, use DELETE DATASET dsn.
Regards,
Naimesh
07-14-2006 7:58 AM
Hi!
You can get a list of all files with FM SXPG_COMMAND_EXECUTE - in table SXPGCOSTAB you can have a look for the available commands.
Make a DIR or LS, the result table will contain the file list.
Either you read all files (open dataset, read dataset), or you sort by name descending and take only the first one. Deletion is possible with 'delete dataset'.
Regards,
Christian
07-14-2006 8:34 AM