When uploading a file you can set a property that will create a new directory if the destination directory does not exist. To force the creation of the new directory, set FileUpEe's new CreateDirectoryPath property to True. This can be set for all files in the upload, or as a property on each individual file. The property should be set before any calls are made to Save or SaveAs (or before calling SendRequest in an autoprocessed 3-tier upload).
Set for all files in an upload:
FileUpEe.CreateDirectoryPath = [Boolean]
Or set for each file in the upload:
FileEe.CreateDirectoryPath = [Boolean]
No exception will be thrown if an attempt is made to save a file to a non-existent directory without enabling CreateDirectoryPath, so it is necessary to examine Processed property of the FileEe object to determine the success or failure of the save attempt. A value of 0 or saSaved indicates success, and a value of 5 or saNoAction indicates that the path could not be created and the file was not saved. |