Date: Tue, 24 Jan 2006 13:08:16 -0500
Reply-To: Arthur Tabachneck <art297@NETSCAPE.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Arthur Tabachneck <art297@NETSCAPE.NET>
Subject: Re: Error while creating folder through code
Hari,
Your original code wasn't contained in the current post, thus you'll have
to change the following to match your actual directory.
However, that said, try something like the following:
%Let ProjectRootFolderPath = "C:\Documents and Settings\atabachn\";
%let PathofInitialData = "Temp\TR-ERT\";
%let FinalFolderName = "ProductA";
options xwait;
X mkdir &ProjectRootFolderPath.&PathofInitialData.&FinalFolderName.;
Art
--------
On Tue, 24 Jan 2006 09:19:22 -0800, Hari <excel_hari@YAHOO.COM> wrote:
>Eric,
>
>Thanks for the reply. I changed my code to following
>
>X "mkdir &ProjectRootFolderPath&PathofInitialData&FinalFolderName";
>
>and got the error as
>
>A subdirectory or file C:\Documents already exists.
>Error occurred while processing: C:\Documents.
>A subdirectory or file and already exists.
>Error occurred while processing: and.
>A subdirectory or file Settings\abc\desktop\Temp\TR-ERT\ProductA
>already exists.
>
>Error occurred while processing:
>Settings\abc\desktop\Temp\TR-ERT\ProductA.
>
>I also tried the following code with single dot between my macro
>variables
>
>X "mkdir &ProjectRootFolderPath.&PathofInitialData.&FinalFolderName.";
>
>and getting the same error.
>
>A subdirectory or file C:\Documents already exists.
>Error occurred while processing: C:\Documents.
>A subdirectory or file and already exists.
>Error occurred while processing: and.
>A subdirectory or file Settings\abc\desktop\Temp\TR-ERT\ProductA
>already exists.
>
>Error occurred while processing:
>Settings\abc\desktop\Temp\TR-ERT\ProductA.
>
>Regards,
>Hari
>India