Connecting to Windows Server

Hi,

One of the folders in UNIX is mapped with a drive on Windows.From this UNIX machine I want to connect to the Windows Server, perform some checks and view the results back on the UNIX machine.

For e.g. if I touch a file under the shared folder on UNIX, I should be able to telnet to Windows and check if this file has got created under the mapped folder.

Tried using expect but it didn't work. Any suggestions welcome

install and enable ssh service on windows server

I tried using the below piece of code but am not fully there yet:

SERVER=machine name
ID=xyz
PASSWORD=123
   (
       sleep 2
       echo "$ID";   sleep 2
       echo "$PASSWORD"; sleep 2
       echo cd /ABC
            sleep 1
   ) | telnet "$SERVER"

echo "Returning from Windows..."

It goes to the directory specified but within this is where I need to check for the presence of a file. How do I do this?