Using RSH to delete workstation directory with a fault tolerence

I'm using a UNIX server to RSH into a Windows 2000 workstation... I want to run a script that deletes two directories and then go to the next workstation.

This is what I have now, but if for some reason the file is in use or not responding; the 'script' hangs. I'm wondering if anyone knows of a way to cause the script to timeout and move on to the next wrks...

Here is the script I have... Appreciate the help.

for x in `nt_list`;do echo $x;rsh $x "rm -rf c:\docume~1\level2 c:\docume~1\level3";done

Edit: I should also note that the 'nt_list' is a pre-written unix command that shows all of the windows workstations that are connected to the server.

MMmm.. Not an expert, but we also have something like it. Try mounting the drive as a filesystem on the server it self. That way unix will get priority instead of windows. It think it is much faster aswell.. rm /mountC/dir1/dir2/text.txt

Appreciate the feedback. I'm not sure how I could mount a remote Windows workstation drive/directory from a Unix server...

MMMM... That my dear friend is something I will not be able to help U with @ the moment. I'm going to get some coffie... Then after the coffie I might be able to help u.. but I think it will be a very long coffie break.. :frowning:

No problems... I think I'll do the same... I think I'm Googled-out

Samba can do that.

What Unix system are you running?

*cringe*

SCO

We are using Samba; but I'm not sure how to use it for what I'm requesting...