get path of folder for incoming connection

Post Reply
tz8
Member
Posts: 84
Joined: Mon Aug 13, 2012 12:56 pm

get path of folder for incoming connection

Post by tz8 »

Hi,



is there a scripting possibility of getting the path of an incoming connection? I'm having the weird issue that (just for one customer) files are not being accepted as a job by Switch up until i restart the flow... i just want to do a fileList of the folder when s.getJobs() == 0, then crawl through the files and check each file for hasArrived(), if this is true, make a job out of it and send it to the error connection.





var jobList = s.getJobs();

if ( jobList.length == 0 )

{

var inConnList = s.getInConnections();

var inConn = inConnList.at(0);

var inDirPath = inConn.getFolderPath(); // <--- this is needed here!

var inDir = new Dir ( inDirPath );

.

.

.

}





any ideas?



Thorsten
freddyp
Advanced member
Posts: 413
Joined: Thu Feb 09, 2012 3:53 pm

get path of folder for incoming connection

Post by freddyp »

Same answer as for the other post asking for the folder on an outgoing connection: you can only get the name, not the path. Have you and sgeller been talking about this together? :)



Rather than implementing a workaround I would recommend to report this with support to investigate what the real cause of the problem is. If you only have it with specific files, you should perhaps investigate if there is something special about the properties of those files.



Freddy
dkelly
TOP CONTRIBUTOR
Posts: 628
Joined: Mon Nov 29, 2010 8:45 pm
Location: Alpharetta GA USA
Contact:

get path of folder for incoming connection

Post by dkelly »

See my hack in other thread for a workaround
Post Reply