<pre>on exportXCMDToFile  ----  put externalsFolder() & "XCMDs:" into rootFolder  createPath rootFolder -- XCMD  ----  put rootFolder & the short name of this cd & ":" into path  createPath path  ----  if the result is empty then    if fld "externalName" is not empty then writeFile fld "externalName",path & "externalName.txt"    if fld "externalType" is not empty then writeFile fld "externalType",path & "externalType.txt"    if fld "Description" is not empty then writeFile fld "Description",path & "Description.txt"    if fld "Syntax" is not empty then writeFile fld "Syntax",path & "Syntax.txt"    if fld "Parameters" is not empty then writeFile fld "Parameters",path & "Parameters.txt"    if fld "Defaults" is not empty then writeFile fld "Defaults",path & "Defaults.txt"    if fld "Examples" is not empty then writeFile fld "Examples",path & "Examples.txt"    if fld "externalID" is not empty then writeFile fld "externalID",path & "externalID.txt"    if there is a cd btn "install" then      writeFile the script of cd btn "install",path & "InstallationScript.txt"    else      writeFile empty,path & "Resources"      copyResources (path & "Resources")    end if  end if  ----end exportXCMDToFile</pre>