Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > General

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-04-2015, 06:39 PM
JayCee JayCee is offline
Registered User
 
Join Date: Jun 2015
Posts: 1
SFXCL Batch file issues.

Hey all, I'm not a big scripter and this got thrown in my lap!
I need to automate FTP job using SFXCL and am using the "Upload .CSV file" example batch file provided in your automation tips pdf file shown below...

I have replaced C:\Out\*.CSV with the UNC path to my source file...
\\Myserver\Share\Filetobeuploaded.csv

and have replaced sftp://user:pass@192.168.232.149/In with....
sftp://myusername:mypwd@IP of my companies SFTP site/Home/MyFolder

when running my batch file the log always shows it connected for 21 seconds then changes from a Non connected state to a closed state with 0bytes transmitted. Can someone help me figure out what I'm missing here? MUCH APPRECIATED!!!!

@echo off
:: GENERATE A UNIQUE LOG FILE NAME:
for /f "tokens=2-4 delims=/ " %%a in ('date /T') do set MyDate=%%c%%a%%b
for /f "tokens=1-4 delims=:. " %%a in ("%TIME%") do set MyTime=%%a%%b%%c.%%d
set LOGFILE=C:\Temp\SFXCL_LOG__%MyDate%%MyTime%.txt
:: Run SFXCL - upload .CSV files from local "Out" to remote "In" folder:
SFXCL /NOPROMPT /RETRYCOUNT 0 /LOG "%LOGFILE%" \\Myserver\Share\Filetobeuploaded.csv sftp://xxxx:xxxx@192.168.232.149/Home/MyFolder
:: Check for failure
if not %errorlevel%==0 goto FAILURE
:: Otherwise... Success!
goto SUCCESS
:FAILURE
echo. Transfer Failure. See %LOGFILE% for details.
goto END
:SUCCESS
echo. Transfer Success.
goto END
:END
echo. Batch file exiting

Last edited by rtb; 06-05-2015 at 08:03 AM. Reason: This is a note for the previous edit. I turned off smiles so that the post made sense and wasn't potentially offensive.
Reply With Quote
 

Tags
automate , batch , ftp , sfxcl


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

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 03:40 AM.