The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Watch for File on Windows share using Shell Script dharam_v UNIX for Dummies Questions & Answers 1 08-23-2008 11:36 AM
like to share this beautiful shell script girish.batra Shell Programming and Scripting 0 02-29-2008 04:22 AM
how i can share the file between unix or linux in windows ?? msn22 Linux 4 12-07-2006 12:13 PM
write syslog to windows share zuessh AIX 4 06-28-2006 02:37 AM
Mounting a windows share on AIX szahir1 Windows & DOS: Issues & Discussions 3 04-11-2002 06:14 AM

Closed Thread
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 08-22-2008
Registered User
 

Join Date: Aug 2008
Posts: 2
Watch for File on Windows share using Shell Script

Watch for File on Windows share using Shell Script
I want to poll a particular file on a Windows shared drive using shell script and copy it to a Unix directory if present.

Step wise execution:
1) Poll/watch for a file in the following location on Windows share:
(SRC_DIR=\\mum\dharmesh\research\ST_DXR_20080821 to DXR.xls)

2) If present, copy(FTP would be a suitable option) it to Unix directory
(DEST_DIR=/home/dharmesh/DXRFiles)
after renaming it.
I have figured out how to FTP and rename it, using the following piece of code:-

ftp -iv <hostname> << EOF
bin
cd "$SRC_DIR"

lcd "$DEST_DIR"
get "ST_DXR_20080821 to DXR.xls" "ST_DXR_20080821.xls"
close
bye
EOF


The real problem lies in Step 1.
Any suggestions/help needed.

Thanks,
dV
Forum Sponsor
  #2  
Old 08-22-2008
Moderator
 

Join Date: Feb 2007
Posts: 2,204
No duplicate or cross-posting, please read the rules.

Continue here:

Watch for File on Windows share using Shell Script

Thread closed.
Google The UNIX and Linux Forums
Closed Thread

Thread Tools
Display Modes




All times are GMT -7. The time now is 01:45 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0