Skip to content
+1-888-319-3663

COMMUNITY FORUM

Scripting to upload file to SFTP

Lee Greatorex asked 5 years ago
Hi I’m looking for some feedback / pointers
in regards to SFTP uploading files that have been output by smartconnect.

In our test environment I’m dropping files with a static filename , then firing a smartconnect script
which copies to another location and renames the files to include formatted date and timestamps
I want to tag onto this a SFTP upload and I think possibly winSCP is the tool of choice.
Before I head off down this route I thought it would be a good Idea to check in here first for
any feedback.
Thanks In Advance
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Answers
Patrick Roth Staff answered 5 years ago
I’m not very familiar with the application but you should be able to use it.
If it is just an assembly, you can use the ScriptNamespaces window in order to add a reference to it.
then code normally.
or if it has an exe component, you could call that via .NET without the reference.
Lee Greatorex replied 5 years ago

Hey Patrick , thanks for the response
Here’s a link fyi https://winscp.net/eng/docs/library

looking into the ScriptNamespaces now

Lee Greatorex replied 5 years ago

http://www.eonesolutions.com/blog-post/tech-tuesday-smartconnect-script-namespaces/

Hi Patrick we are on version 20.14.1.25 and I don’t see the script namespaces in the generic connection section of the toolbar
could this be a version or permissions issue

Patrick Roth Staff replied 5 years ago

That window does not exist in SC 2014. However the table does and you could insert the record into it manually.

Lee Greatorex replied 5 years ago

Thanks Patrick , that’s good news

ok cool so it’s inbuilt functionality in 2014 that was just not exposed via the GUI :).
so I took a look the columns are as below

I’m just not sure about the IsSystem column
would the below be deemed a correct useable entry ?
all other entries have IsSystem= 1 but I thought that might be a smartconnect is internal flag or something

ScriptNamespaceId = ‘WinSCPnet’
AssemblyPath= ‘d:\Program Files (x86)\WinSCP-portable\WinSCPnet.dll’
IsSystem= 0

Patrick Roth Staff replied 5 years ago

assuming the ScriptNamespaceId is correct, isSystem = 0 is ok I think.
you can try using a path like that.
personally i’d copy the file into the SC folder and also put it in the GAC


If you would like to submit an answer or comment, please sign in to the eOne portal.