I'm trying to upload a file into the Rulestream application using the File Import custom UI control and the File Import Spec. The file import is working to the point of getting the file copied into the working folder, but instead of having the file name I expect (filname.ext), it is getting a prefix added to it (3770_161_filname.ext). I assume I should be able to retrieve the uploaded file name from the File Import Spec, but how?
Isn't prefix related with project ID and Lineitem ID?
If so, knowing the rule you can forecast the name.
Or you can retrieve the file just after file import by looking for most recent file or specyfing seach filter to find a file where name contains something.Both using Directory.GetFiles() method
As I encountered the same issue with using File Import spec in ThinClient I asked this question to Siemens guys and recieved an answer.
Imported file name is stored in spec attributes.
So following code allows to retrieve exact name of uploaded file: