From 277d1edfa17bf3719d90ddbac8e31f6181e952c3 Mon Sep 17 00:00:00 2001 From: Sandeep Gupta Date: Sun, 18 Jun 2017 23:55:40 +0530 Subject: First commit --- macros/GeneralFunctions/SCI2CCreateDir.sci | 31 ++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 macros/GeneralFunctions/SCI2CCreateDir.sci (limited to 'macros/GeneralFunctions/SCI2CCreateDir.sci') diff --git a/macros/GeneralFunctions/SCI2CCreateDir.sci b/macros/GeneralFunctions/SCI2CCreateDir.sci new file mode 100644 index 00000000..dcc39c3e --- /dev/null +++ b/macros/GeneralFunctions/SCI2CCreateDir.sci @@ -0,0 +1,31 @@ +function SCI2CCreateDir(OutDir) +// function SCI2CCreateDir(OutDir) +// ----------------------------------------------------------------- +// Create the dir OutDir. +// +// Input data: +// OutDir: full path (absolute or relative) of the directory to be created. +// +// Output data: +// --- +// +// Status: +// 25-Jun-2007 -- Raffaele Nutricato: Author. +// +// Copyright 2007 Raffaele Nutricato. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),1,1); + +[tmppath,tmpfname,tmpextension]=fileparts(OutDir) ; + +status_dir = mkdir(tmppath,tmpfname+tmpextension) ; +if (status_dir == 0) + error(9999, 'Cannot create: '+OutDir); +end + +endfunction -- cgit