Connect to Windows server from Linux

Hi,
We are running Linux server and are required to connect to Windows server and fetch the files from windows server.
How can i connect to Windows server from Linux? I have to do this with a automated shell script on Linux
I appreciate your response.

automated shellscript meaning scheduled? use cron
fetch files: Look at smbclient man pages for correct syntax and usage

smbclient is not installed on my linux system?

Do i have any other option just like "ftp" to connect to windows server.

If your windows server exports no shares and runs no FTP/SFTP/SCP/rsync/tftp/whatever daemons, linux cannot magic itself in. Whether you can use any of these solutions depends on your sysadmin.

smbclient is part of the very common samba suite if you wish to install it. It lets you retrieve a file from a share in one command. If you must work without smbclient, Linux can mount a Windows file share like a partition, via the cifs kernel module:

# modprobe might not be needed
modprobe cifs
mount -t cifs //192.168.0.1/remoteshare /local/path -o username=user,password="Password"
cp /local/path/remotefile /path/to/localdestination

This will only work if Windows is exporting a file share named remoteshare of course.

if you want ftp, there is a good, free, ftp server for windows: freeftpd freeSSHd and freeFTPd - open source SSH and SFTP servers for Windows
I'm not sure how secure it is, though.