Link to home
Start Free TrialLog in
Avatar of V Thrusher
V Thrusher

asked on

script to ftp the txt files from windows to unix server automatically daily

script to ftp the txt files from windows to unix server automatically daily
Avatar of Bill Prew
Bill Prew

It would be helpful if you could explain further in more detail what you want, and what your environment is.

What type of FTP does the server require, is it just plain FTP, or SFTP?

Is a VBscript solution a must, or could a different approach work?

Are you already sending the files manually, and if so how.

Could you install a third party FTP utility like WinSCP that can be scripted to do the transfers?

Where are the files located and how are they identified each day? (All in one folder, multiple folders, send all each day, send only new files, ...).

These are just a few thoughts / questions I had, feel free to include other info that would be useful.  The more info you can provide the more experts are likely to participate, and the faster you will get a working approach.


»bp
Avatar of V Thrusher

ASKER

1. What type of FTP does the server require, is it just plain FTP, or SFTP? -- need FTP

2.Is a VBscript solution a must, or could a different approach work?-- Any script is fine, vb script or shell script

3.Are you already sending the files manually, and if so how.

i'm not sending the files manually, actually everyday i get a alert mail in outlook, which is txt file. i'm planning to store the file locally automatically from outlook once it arrives and ftp this file to AIX server. So i'm  also checking on how to format a rule in outlook to store attachment  locally.

4. Could you install a third party FTP utility like WinSCP that can be scripted to do the transfers? -- we can do that also but it needs to automatically run daily without any dependencies

5.Where are the files located and how are they identified each day? (All in one folder, multiple folders, send all each day, send only new files, ...). --- filename will be tmp Exception Activities Item* (*- some number which will be unique everyday)
Here's a small BAT script you can start from.  Adjust the variables near the top for your needs.  It sends all files in the local folder specified.

@echo off
setlocal 

set ftpserver=ftp.test.net
set username=uuuuuuuu
set password=pppppppp
set localdir=c:\dir1\dir2
set remotedir=/dir1/dir2

(echo open %ftpserver%
echo user %username% %password%
echo cd %remotedir%
echo lcd "%localdir%"
echo mput *.*
echo quit
) | ftp -n -i

Open in new window


»bp
Okay Let me test it out..Thanks Bill
How to send the file name being with tmp exception activities* alone instead of sending the all the files from local directory
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