BookmarkSubscribeRSS Feed
thanikondharish
Calcite | Level 5

i have one rtf file in this location 'D:\newfolder\ex1.rtf' ;

 

 

how to delete that rtf file by using sas programing?

3 REPLIES 3
Jagadishkatam
Amethyst | Level 16
data have;
	length path $100;
	infile datalines;
	input path;
	datalines;
D:\newfolder\ex1.rtf
;
run;

data _null_;
	set have;	
	fname="temp";
    rc=filename(fname,path);
    if rc = 0 and fexist(fname) then
       rc=fdelete(fname);
    rc=filename(fname);
run;
Thanks,
Jag
Kurt_Bremser
Super User

A simple google search for "sas delete file" would give you loads of answers. Please do at least a little work yourself, it won't break your fingers or make your head explode. Promise.

VDD
Ammonite | Level 13 VDD
Ammonite | Level 13

you asked this same question under 2 different subject.   Please keep subjects together and mark them as completed when someone answers your question/s. 

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 1082 views
  • 1 like
  • 4 in conversation