The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 and shell scripting languages 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 02:36 PM
like to share this beautiful shell script girish.batra Shell Programming and Scripting 0 02-29-2008 07:22 AM
how i can share the file between unix or linux in windows ?? msn22 Linux 4 12-07-2006 03:13 PM
write syslog to windows share zuessh AIX 4 06-28-2006 05:37 AM
Mounting a windows share on AIX szahir1 Windows & DOS: Issues & Discussions 3 04-11-2002 09:14 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-22-2008
dharam_v dharam_v is offline
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
  #2 (permalink)  
Old 08-22-2008
Franklin52 Franklin52 is offline Forum Staff  
Moderator
  
 

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

Continue here:

Watch for File on Windows share using Shell Script

Thread closed.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 05:34 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0