Hi Neils,
I have been uploading a file to a named subdirectory depending on the sending entity ( and their defined upload directory). The trick is to use the Web handler to set the desired path...
In WebHandler
Rename file routine - AFTER PARENT
***********************************
p_web.RenameFile PROCEDURE(STRING p_name,STRING p_filename,<String p_path>)
ReturnValue ANY
CODE
ReturnValue = PARENT.RenameFile(p_name,p_filename,p_path)
MESSAGE('pname ' & p_name)
if p_name = 'upfilename' ! uploading schedule file
locpath = p_web.GSV('tProvRptDir') ! this is the provider file
! message('report dir ' & locpath)
locpath = clip(locpath) & '\INFILE\' ! this adds teh Infile path
! message('upload path: ' & locpath)
RETURNVALUE = Parent.RenameFile(p_name,p_filename,locpath)
RETURN RETURNVALUE
END
*************************************
This makes sure that the file goes to the correct subdirectory.
SECOND- my subdirectories are already in place. If you are creating one on the fly, you might go back and make sure that the app can see the newly created subdirectory before trying to write to it.
There are a few things for you to try - hope it gets you pointed in the right direction.
Ron Jolda