Date: Mon, 17 Nov 2003 06:27:58 -0500
Reply-To: Peter Crawford <peter@CRAWFORDSOFTWARE.DEMON.CO.UK>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Peter Crawford <peter@CRAWFORDSOFTWARE.DEMON.CO.UK>
Subject: Re: how to delete external file (filename or pathname has space
inside) in SAS?
I usually find DOS accepts filenames with embedded spaces, when
defined by quoting them like
del "c:\my project1\reports and listing\myfile.emf"
to achieve the equivalent in your sas code, try
data _null_;
command="del ""&report.myfile.emf"" ";
call system(command);
run;
where you want a " within a "-quoted string, just repeat it.
Good Luck
Peter Crawford
On Fri, 14 Nov 2003 12:42:05 -0800, Helen <sunchunkui@HOTMAIL.COM> wrote:
>Dear SAS-L,
>
>I would like to delete some temp files which either have space in
>filename or have space in pathname in SAS. But I couldn't do it via
>the following codes:
>
>data _null_;
> command="del &report.myfile.emf";
> call system(command);
>run;
>
>Because the pathname(&report=c:\my project1\reports and listing\) has
>spaces inside which MSDOS command don't take it.
>
>Could someone tell me a way to do it in SAS? Thanks!
>
>Helen
|