Creating images folder if it doesn't exist

I am trying to export any figures into an images folder within the folder which has my created HTML file.  If there is no images folder already, however, I am trying to use the create function to create it.  However, I am receiving an error when I try to use the create method to create the folder.  Here is my current code:

outputFile = get(dbeFileName);
filePath = outputFile[0: offset];
filePath = filePath "images\\";
bool folderExist = fileExists_(filePath ".");
if (!fileExists_(filePath ".")) {
    create("images\\","images folder");
}

If I don't have an images folder, I am getting into the if-statement, but I receive the error message: "<Line: ###> not a link module".  I had found this function in the DXL Reference Manual under the Folders section in Chapter 15 which says the declaration is:

Folder create(string name, string description).

I have tried performing the create function both with and without the backslashes on either side.

As always, any help would be appreciated.

Chris Cote


chrscote - Tue Jan 10 11:09:52 EST 2017

Re: Creating images folder if it doesn't exist
PekkaMakinen - Tue Jan 10 11:25:16 EST 2017

You confuse the DOORS folder concept with a directory on disk. There is a different set of functions working with items on disk, e.g. mkdir

See https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014598813