One job in unix server will generate .csv files daily. I need to copy the latest of these .csv file from the unix server to the shared drive/folder in windows through unix script. My shared folder will look something like
W:\some folder(for example). Could any one of you please help me out with the unix script which will transfer the latest file from unix server to shared folder.
For starters, how is the data accessed? Samba? FTP? SCP?
If it's really a windows file share(samba), then there's things outside the script you'll need to set up first. You'll need to get the directory mounted on your server. How to do that depends on what your server actually is.
FTP is not a Windows file share. If it's FTP, you can use ftp and not mount anything.
That KSH script is full of FTP commands and won't work, because FTP is not KSH. You have to feed them into the ftp command, which is different on different versions of UNIX. What's your system?
"\\auviccf03\temp" is probably not a folder you can CD to, you'll need the actual folder not the network one. If you only have the network one then it's not FTP after all.
You've also got the mput before you change directory, which is probably not what you want.
#!/bin/ksh
ftp <<EOF
lcd /home/manuownr/temp
USER xxxx
PASSWD xxxxx
prompt n
cd c:\path\to\file
mput *.*
quit
EOF