Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Delete the files in Unix

Hi

My program downloading data to Unix.

My requirement is, before download to unix i need to delete the existing files started with 2703 cost* .

Is it possible to use wild card? Pls help me

Regards

Anbulakshmi

Tags:
replied

I have done this. To access the file from UNIX...

To access the file..

*-c list in time order.

CONCATENATE 'ls -c' p_fin INTO w_list_commandin

SEPARATED BY space.

CONCATENATE w_list_commandin '/.' INTO w_list_commandin.

  • CALL unix list command - will populate itab_file_list ITAB

CALL 'SYSTEM' ID 'COMMAND' FIELD w_list_commandin ID 'TAB'

FIELD it_file_list-sys.

To delete..

  • Remove the file once it is processed

CONCATENATE 'rm' it_file_list-file_name

INTO w_runcmd SEPARATED BY space.

  • send command to unix to move item file

CALL 'SYSTEM' ID 'COMMAND' FIELD w_runcmd.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question