BatchScript/Unix shell Script to check folder in Windows server

Hi,

It will be great help if any of them can provide or tell which scripting is possible to write for checking folder exists or not in Windows server from Unix/Windows machine.

If folder doesn't exist then need to create the folder through script and copy the files.

It is on very highly required. Please post the script asap.

Regards,
Prakash

You could SAMBA mount the windows subtree on UNIX and use the bash/ksh/sh test "if [ -d YOUR_DIR_MOUNT_PATH ];then . . . ."

ftp/sftp or scp can create folders and copy files easily but you need a server on the target.

The tool smbget seems nice if you do not want to mount with SAMBA and you are pulling files from windows: Man Page for smbget (all Section 1) - The UNIX and Linux Forums A more versatile tool for SMB access is smbclient: Man Page for smbclient (all Section 1) - The UNIX and Linux Forums