Link to home
Start Free TrialLog in
Avatar of Classic1
Classic1Flag for Canada

asked on

FTP settings during automated FTP upload

Hi there,
Was wondering if someone can help me out here...
One of our customers changed their FTP application, and as a result, broke our automated process. What was set up to run daily:

@echo off
echo user "username"> ftpcmd.dat
echo "password">> ftpcmd.dat
echo bin>> ftpcmd.dat
echo put %1>> ftpcmd.dat
echo quit>> ftpcmd.dat
ftp -n -s:ftpcmd.dat ftp.site.com
del ftpcmd.dat

Open in new window


Using FileZilla, I managed to troubleshoot some settings: FTP -> Active Mode and Encryption-> Only use plain FTP (insecure)
Once these were set, I was able to connect to the server and manually upload the file.

Is there any way to set these settings in the batch file above? Or would I need to go a different way?

Please let me know if you need additional info/details...

Much appreciated,
Classic
Avatar of Bill Prew
Bill Prew

Do you have to use FileZilla?  The prior approach was using the standard FTP client that is part of Windows, and that should still be on that computer as well.  The two programs can peacefully co-exist...  As it stands your script should still run, and use the default windows FTP client, or is that not the case?

(from the "if it isn't broke don't fix it department")


»bp
Avatar of Classic1

ASKER

Hi Bill,
Thanks for the quick reply!
So the customer moved from FileZilla to an external crushftp site over the holiday break (which we were the last to know...LOL). I don't know if it actually configured properly, but on my own computer (FileZilla), I had to play around with the site settings, in order to connect/upload files successfully. I thought I could 'mimic' the settings within the batch file somehow...

The batch file is on one of our Windows Server and was running fine until their application change...

Much appreciated,
Classic
Oh, I get it better now, I misunderstood a bit before.

So the host server that you upload to  changed their FTP software, and now the prior BAT script that you were using doesn't work.  That's not too surprising, it is a pretty bare bones FTP client.

Do you know what the settings were you had to tweak?  Active versus passive xfer?  Or security related (requiring SFTP or FTPS)?

Depending on the requirements of the new FTP site that will determine of the Windows client can be made to work, or if you need to look elsewhere.  FileZilla is okay for interactive work, but doesn't support any scripting as far as I know.  But you could look at something like WinSCP or maybe even one of my favorite ways to do simple FTP xfers from a command line, NCFTP.


»bp
Hi Bill,
Yup, using FileZilla, the settings (for the customer's site) that I changed were:

Transfer mode: Active
Protocol: FTPUser generated imageEncryption: Only use plain FTP (insecure)
User generated image
I'll take a look at NCFTP, and see if that does the trick...

Thanks again,
Classic
ASKER CERTIFIED SOLUTION
Avatar of Bill Prew
Bill Prew

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi Bill,
I've embedded a couple of screenshots of the errors I got using Windows FTP and WinSCP...(it was easier to convert my script to WinSCP). It looks like their server terminates the connection...

User generated image

User generated image
Either way, I talked to the customer and they were happy receiving the data via email, so I quickly wrote a PowerShell script and that did the trick...

Thanks a bunch for your comments...

Regards,
Classic
Thanks for your help!

Much appreciated,
Classic
Thanks for the feedback and glad you got a solution worked out.


»bp