Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Notices

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 12-17-2008, 12:16 PM
jjacobus jjacobus is offline
Registered User
 
Join Date: Apr 2004
Location: Vernon Hills, IL
Posts: 7
Download single file with sfxcl

What's the proper syntax with sfxcl to download a single file? Using
"sfxcl ftp://<acc>:<pass>@example.com/from_detroit c:\temp"
downloads all the file in "/from_detroit" on the remote system to the local "c:\temp" directory easily. However, if I add a single file name, sfxcl generates errors. Example:
"sfxcl ftp://<acc>:<pass>@example.com/from_detroit/myfile.tar c:\temp"

Using sfxcl version 6.1.3 (build 423) on Windows XP Pro Version 2002 Service Pack 3. Remote system is RedHat Linux.
Reply With Quote
  #2  
Old 12-17-2008, 01:34 PM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
Hi jjacobus,

I have not been able to reproduce the problem you have described.

Would you let me know what errors you are receiving?

Would you try running the command again with the addition of /Log test.txt and post the log contents, or send the log file to support@vandyke.com with Attn: Todd - Forum thread #3357 in the subject line, as there may be sensitive data in the log?

For example:
sfxcl /Log test.txt ftp://<acc>:<pass>@example.com/from_detroit/myfile.tar c:\temp
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #3  
Old 12-17-2008, 02:23 PM
jjacobus jjacobus is offline
Registered User
 
Join Date: Apr 2004
Location: Vernon Hills, IL
Posts: 7
Here's a piece of the log file that's relavant.
SFXCL /LOG SFXCL_LOG /RetryCount 0 "ftp://dummy:*******@72.3.1.1/from_chicago/srd.tar.gz" "C:\Apache2\htdocs\srd"
2008-12-17 12:31:38, 00001: sfxcl version 6.1.3.423 (Official Release - December 2, 2008)
2008-12-17 12:31:38, 00001: Session 00001 established for transfer from ftp://dummy:*******@72.3.1.1/from_chicago/srd.tar.gz
2008-12-17 12:31:38, 00001: Control connection successfully established.
2008-12-17 12:31:38, 00001: 220 Hello.
2008-12-17 12:31:38, 00001: Time zone of server could not be determined.
Connection to 72.3.1.1 established.
2008-12-17 12:31:38, 00001: USER dummy
Logging in ...
2008-12-17 12:31:38, 00001: 331 Please specify the password.
2008-12-17 12:31:38, 00001: PASS <password>
Logging in ...
2008-12-17 12:31:38, 00001: 230 Login successful.
Logged in successfully.
2008-12-17 12:31:38, 00001: SYST
Determining the remote system type.
2008-12-17 12:31:38, 00001: 215 UNIX Type: L8
Remote system type determined.
2008-12-17 12:31:38, 00001: Remote operating system type is UNIX.
2008-12-17 12:31:38, 00001: FEAT
Determining the remote system extended features.
....
2008-12-17 12:31:39, 00001: Transfer(019E1908): PWD
2008-12-17 12:31:39, 00001: Transfer(019E1908): 257 "/var/www"
Beginning transfer.
Changing directories...
2008-12-17 12:31:39, 00001: Transfer(019E1908): CWD /var/www/from_chicago/srd.tar.gz
2008-12-17 12:31:39, 00001: Transfer(019E1908): 550 Failed to change directory.

Changing directories...
2008-12-17 12:31:39, 00001: Transfer(019E1908): CWD /var/www/from_chicago/
2008-12-17 12:31:39, 00001: Transfer(019E1908): 250 Directory successfully changed.
Checking remote file status...
2008-12-17 12:31:39, 00001: Transfer(019E1908): TYPE A
2008-12-17 12:31:39, 00001: Transfer(019E1908): 200 Switching to ASCII mode.
2008-12-17 12:31:39, 00001: Transfer(019E1908): PASV
2008-12-17 12:31:39, 00001: Transfer(019E1908): 227 Entering Passive Mode (72,3,133,22,97,32)
2008-12-17 12:31:39, 00001: Transfer(019E1908): LIST srd.tar.gz
(Why do I get a directory list when I didn't ask for it?)
2008-12-17 12:31:39, 00001: Transfer(019E1908): Data connection 71AB4211 connected.
2008-12-17 12:31:39, 00001: Transfer(019E1908): 150 Here comes the directory listing.
2008-12-17 12:31:39, 00001: Transfer(019E1908): -rw-r--r-- 1 502 503 459100 Dec 17 08:02 srd.tar.gz
2008-12-17 12:31:39, 00001: Transfer(019E1908): 226 Directory send OK.
2008-12-17 12:31:39, 00001: Transfer(019E1908): Data connection 71AB4211 closed normally.
Reply With Quote
  #4  
Old 12-17-2008, 06:12 PM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
Hi jjacobus,

The SFXCL syntax you provided in your first post is correct.

Let us take a step back. Are you able to successfully transfer a file using the command that produced the log results that you posted below?

If not, would you be able to provide the entire log generated by SFXCL?

Typically, the last 6 lines of the log file are indicative of a successful or failed transfer.

Code:
2008-12-17 18:07:57, 00001: Transfer(014ABCA0): 0 bytes transferred in 0.02 seconds (0.00 KB/s).
2008-12-17 18:07:57, 00001: Transfer(014ABCA0): SUMMARY: Attempted to transfer 1 files.
2008-12-17 18:07:57, 00001: Transfer(014ABCA0): SUMMARY: Transferred 1 files successfully.
2008-12-17 18:07:57, 00001: QUIT
2008-12-17 18:07:57, 00001: 220 Goodbye.
2008-12-17 18:07:57, 00001: Control connection closed normally.
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #5  
Old 12-19-2008, 05:30 AM
jjacobus jjacobus is offline
Registered User
 
Join Date: Apr 2004
Location: Vernon Hills, IL
Posts: 7
File does get downloaded successfully. (end of the log file is below). But it's not clean since it fails first, then shows a listing, then transfers the file. I've got an automated process that reads the SFXCL log file to send reports and it's difficult to ascertain success/failure for my reports.

2008-12-17 12:31:39, 00001: Transfer(019E1908): Opening file 'srd.tar.gz' for download as 'srd.tar.gz'.
Transferring file...
2008-12-17 12:31:39, 00001: Transfer(019E1908): TYPE I
2008-12-17 12:31:39, 00001: Transfer(019E1908): 200 Switching to Binary mode.
2008-12-17 12:31:39, 00001: Transfer(019E1908): PASV
2008-12-17 12:31:39, 00001: Transfer(019E1908): 227 Entering Passive Mode (72,.......)
2008-12-17 12:31:39, 00001: Transfer(019E1908): RETR srd.tar.gz
2008-12-17 12:31:39, 00001: Transfer(019E1908): Data connection 71AB4211 connected.
2008-12-17 12:31:39, 00001: Transfer(019E1908): 150 Opening BINARY mode data connection for srd.tar.gz (459100 bytes).
2008-12-17 12:31:41, 00001: Transfer(019E1908): 226 File send OK.
2008-12-17 12:31:41, 00001: Transfer(019E1908): Data connection 71AB4211 closed normally.
Remote file closed.
2008-12-17 12:31:41, 00001: Transfer(019E1908): 448.3 KB transferred in 1.59 seconds (281.31 KB/s).
2008-12-17 12:31:41, 00001: Transfer(019E1908): SUMMARY: Attempted to transfer 1 files.
2008-12-17 12:31:41, 00001: Transfer(019E1908): SUMMARY: Transferred 1 files successfully.
2008-12-17 12:31:41, 00001: QUIT
Reply With Quote
  #6  
Old 12-19-2008, 09:19 AM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
Hi jjacobus,

The errors that you point to are by design, as this is how SFXCL determines whether a file or directory is being transferred and if the file actually exists.

It may be a better option to monitor the exit code of SFXCL which will be zero for success or not zero for failure, as this seems like a more sure way to determine the failure or success of a transfer.

Do think that this might assist in your goal of being able to run success/failure report for file transfers attempted?
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #7  
Old 12-19-2008, 10:41 AM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
Hi jjacobus,

After further researching this issue, if you need to have more detailed information provided for you reporting purposes, then it may be possible to resolve the issue you have encountered by using a pre-release version of SecureFX which has a new feature that allows for the ability to specify that a file is being transferred rather than SFXCL having to perform file/folder checks in the process of transferring a file.

If you would like to test this newer version of SecureFX, please send an email to support@vandyke.com with a subject of 'Attn: Todd - Forum thread #3357', and your serial number and request in the body of the email.
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
Reply

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 09:18 PM.