View Single Post
Old 11-21-2005, 08:23 AM  
Senior Member
Join Date: Jan 2002
Location: Madrid, Spain
Posts: 346
Cool .sh/.bat ftp script

Hi all.

After searching on Google and trying a couple of ideas ... i'm lost. Here we go:

1) There're two machines: one is Unix and the other one is Windows.

2) On Windows machine there're a couple of csv files (inside a folder called 'A') that should be transferred to Unix (to a 'B' folder) through ftp. I can use an .sh script (to 'get' files) or a .bat file (to 'put' files). The script will be executed every 10 minutes, every day. I can't use FlashFXP or other GUI client, only 'shell' scripting.

3) The tricky part is that for each file transferred i should move it to another folder: for each file transfered from 'A' Windows folder to 'B' Unix folder i should move it to 'C' Windows folder (a subdirectory inside 'A' Windows folder). This is to avoid the same file transfer on future script runs.

4) I know how to make a simple .bat ftp script that will upload one file to another host, but i'm really lost at how can i control that one file is transferred and once is transfered, move it to another folder.

Any ideas?.

Thanks in advance for your time.
DYN_DaTa is offline