Hello,
I try to output some files from an ulp, in a specific folder. I can create
the desired path, but "output" function don't create the folder.
I can use the "dlgDialog" function to create the folder, but I don't want
this aproach.
Hello,
I try to output some files from an ulp, in a specific folder. I can create
the desired path, but "output" function don't create the folder.
I can use the "dlgDialog" function to create the folder, but I don't want
this aproach.
On 09.01.2010 11:34, eSilviu wrote:
"Klaus Schmidinger" <Klaus.Schmidinger@cadsoft.de> wrote in message
news:hi737i$hf5$1@cheetah.cadsoft.de...
On 01/04/10 11:52, eSilviu wrote:
Hello,
I try to output some files from an ulp, in a specific folder. I can
create
the desired path, but "output" function don't create the folder.
I can use the "dlgDialog" function to create the folder, but I don't want
this aproach.
There is currently no direct function to create a new folder from
a ULP. What you can do at te moment is to use the system() function,
like in
system("mkdir foldername");
We are planning to implement an mkdir() function in a future version.
Klaus Schmidinger
Widows XP:
string filePath;
if (board) board(B) {filePath = filedir(B.name);}
filePath=filePath+"output";
string comanda="mkdir "+filePath;
system(comanda);
Will give me the following command to be sent to OS:
"mkdir D:/Documents/Proiecte/2009/temp/555/output"
witch... is wrong, since "\" should be used, not "/"
So,.. any other ideas?
Oh well, one of those "original sins" of Microsoft...
You can do
string a[];
strsplit(a, filePath, '/');
filePath = strjoin(a, '
');
Klaus Schmidinger
--
_______________________________________________________________
Klaus Schmidinger Phone: +49-8635-6989-10
CadSoft Computer GmbH Fax: +49-8635-6989-40
Pleidolfweg 15 Email: kls@cadsoft.de
D-84568 Pleiskirchen, Germany URL: www.cadsoft.de
_______________________________________________________________
On 09.01.2010 11:34, eSilviu wrote:
"Klaus Schmidinger" <Klaus.Schmidinger@cadsoft.de> wrote in message
news:hi737i$hf5$1@cheetah.cadsoft.de...
On 01/04/10 11:52, eSilviu wrote:
Hello,
I try to output some files from an ulp, in a specific folder. I can
create
the desired path, but "output" function don't create the folder.
I can use the "dlgDialog" function to create the folder, but I don't want
this aproach.
There is currently no direct function to create a new folder from
a ULP. What you can do at te moment is to use the system() function,
like in
system("mkdir foldername");
We are planning to implement an mkdir() function in a future version.
Klaus Schmidinger
Widows XP:
string filePath;
if (board) board(B) {filePath = filedir(B.name);}
filePath=filePath+"output";
string comanda="mkdir "+filePath;
system(comanda);
Will give me the following command to be sent to OS:
"mkdir D:/Documents/Proiecte/2009/temp/555/output"
witch... is wrong, since "\" should be used, not "/"
So,.. any other ideas?
Oh well, one of those "original sins" of Microsoft...
You can do
string a[];
strsplit(a, filePath, '/');
filePath = strjoin(a, '
');
Klaus Schmidinger
--
_______________________________________________________________
Klaus Schmidinger Phone: +49-8635-6989-10
CadSoft Computer GmbH Fax: +49-8635-6989-40
Pleidolfweg 15 Email: kls@cadsoft.de
D-84568 Pleiskirchen, Germany URL: www.cadsoft.de
_______________________________________________________________