Thanks a lot, Alexander!  I was considering shell scripting, but never having 
any experience with smbfs, I am not sure how to approach the problem.  I 
appreciate your suggestion and will test them.
 
~mark

>>> Alexander Foken <[EMAIL PROTECTED]> 11-May-06 01:21:08 AM >>>

How about a simple shell script?

#!/bin/sh
mount -t smbfs //server/share /mnt/blabla
cp /mnt/blabla/path/on/the/share/* /some/where
umount /mnt/blabla
# and if you want to work with the files:
perl yourscript.pl -some -arguments /some/where

(Of course, you could also implement the calls to mount and umount in 
Perl, and copy the files using File::Find and File::Copy.)

You could also work with the files directly from the server:

#!/bin/sh
mount -t smbfs //server/share /mnt/blabla
perl yourscript.pl -some -arguments /mnt/blabla/path/on/the/share
# - or -
# cd /mnt/blabla/path/on/the/share
# perl yourscript.pl -some -arguments .
# cd /
umount /mnt/blabla

To allow mounting and unmounting without root privileges, you should 
create a matching entry in /etc/fstab (man 5 fstab), using the "user" 
parameter. Something like

    //server/share /mnt/blabla smbfs noauto,user,rw 0 0

In that case, only /mnt/blabla is required as argument for mount.

Alexander


On 10.05.2006 22:50, Mark Galbreath wrote:

>Not directly on topic, but close....
> 
>I am automating the import of Oracle DBM datafiles into MySQL tables via DBI, 
>DBD::XBase, and DBD::mysql.  The files are on a Novell shared directory on a 
>Windows server and my app will run on a linux kernel 2.6 box.  I have smbmount 
>3.0.10-1 installed.  Are there any perl modules/utilities I can scrounge to 
>transfer those DBF files programmatically (cron) to my linux workstation?
> 
>tia,
>mark
>
>
>  
>


-- 
Alexander Foken
mailto:[EMAIL PROTECTED]  http://www.foken.de/alexander/



Reply via email to