Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

multiple delete dataset (*.*) possible ?

Former Member
0 Likes
615

hi there,

i want to delete files in a directory which

are ending with '.pdf'. is this possible with

ONE 'delete dataset' ? can i put asterix '*'

for the delete dataset statement for muliple

deleting ? if not, what solution you can

recommend ?

regards, Martin

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
534

Hi,

use FM gui_upload to load the files from presentation server to internal table.

Delete itab.

this deletes all the files in the internal table.

regards,

keerthi.

3 REPLIES 3
Read only

dani_mn
Active Contributor
0 Likes
534

HI,

you can't do like this.

you have to get all files in an internal table and then delete them using the loop.

loop at itab.

delete dataset itab-filename.

endloop.

REgards,

Read only

Former Member
0 Likes
534

Hi ,

you cannot delete the Files at one go using '*' and delete dataset statement. You can do programatically by calling the files in application server into internal table using the Function module SUBST_GET_FILE_LIST and then looping through the function module and delete the file one by one as Wasim has illustrated in the previous post.

Hope this helps.

Read only

Former Member
0 Likes
535

Hi,

use FM gui_upload to load the files from presentation server to internal table.

Delete itab.

this deletes all the files in the internal table.

regards,

keerthi.