Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 09-30-2005, 12:42 PM
mnman66's Avatar
mnman66 mnman66 is offline
Registered User
 
Join Date: Sep 2005
Posts: 3
Exclamation New to SFTP scripting

I've used SecureFX since 2003, but have never needed to use SFTP until now. I've now been tasked with creating an automated file transfer. I've established a SFTP session, named TEMP, to a remote server, exchanged keys and have manually tested a file transfer. Now, however, I'm trying to create either a batch file, or incorporate this session into a vbs script. This is what I have so far:
SFXCL.exe /S "/FTP Sites/TEMP" "C:\temp\test.txt" "/test.txt"

However, when I try and excecute this in a batch, it says '/FTP Sites/TEMP' was not found in the session database. What am I missing? Did the install not go correctly, so any session you start, you can't use for this?
Reply With Quote
  #2  
Old 10-03-2005, 02:08 PM
bocks's Avatar
bocks bocks is offline
VanDyke Customer Support
 
Join Date: Jan 2004
Location: Albuquerque, NM
Posts: 184
Hi mnman66,
Quote:
Originally Posted by mnman66
I've used SecureFX since 2003, but have never needed to use SFTP until now. I've now been tasked with creating an automated file transfer. I've established a SFTP session, named TEMP, to a remote server, exchanged keys and have manually tested a file transfer. Now, however, I'm trying to create either a batch file, or incorporate this session into a vbs script. This is what I have so far:
SFXCL.exe /S "/FTP Sites/TEMP" "C:\temp\test.txt" "/test.txt"

However, when I try and excecute this in a batch, it says '/FTP Sites/TEMP' was not found in the session database. What am I missing? Did the install not go correctly, so any session you start, you can't use for this?
When you specify the session with the /S flag, you do not need to use the /FTP Sites entry, just the session itself:

SFXCL.exe /S "/TEMP" "C:\temp\test.txt" "/test.txt"

Can you try this and let me know how it works for you?

Thanks,

-bocks
Reply With Quote
  #3  
Old 10-05-2005, 06:18 AM
mnman66's Avatar
mnman66 mnman66 is offline
Registered User
 
Join Date: Sep 2005
Posts: 3
Talking

Well, actually I called support and got the following answer for my problem, which works:

SFXCL.exe C:\temp\test.txt /S TEMP /test.txt >testtrans.log

I was told the same thing, that if you create a session, it's a "given" that the Ftp Sites directory is the home directory. If I had created a folder within that and called it TEMP, then had temp session within the TEMP folder, then I would have had to specify : /TEMP/temp
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 06:54 AM.