?
Solved

How to copy directories from Linux to Windows?

Posted on 2004-09-29
2
Medium Priority
?
610 Views
Last Modified: 2013-12-16
Hello,

I want to copy some files from my Linux box (RedHat9.0) to my Windows box (Windows 2003). For that I use Samba.
The files are:
/home/jdoe/mail/*.*
/var/spool/mail/jdoe

I can connect with smbclient from my Linux box to my Windows box

smbclient //MyWindowsServerName/MySharedCarpet -U administrator -W WORKGROUP
Password:****
smb: \>

Initially, I'm on /root/ carpet, but I don't know how to copy /home/jdoe/mail/*.*
If I do:
smb: \> put /home/jdoe/mail/*.*
I get error: /home/jdoe/mail/*.* does not exist
How can I copy directories and files from another path?

0
Comment
Question by:Rosa2003
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 6

Accepted Solution

by:
blkline earned 1500 total points
ID: 12185911
use "mput"...

smb: \> lcd /home/jdoe/mail
smb: \> mput *.*

Barry
0
 

Expert Comment

by:GabeGranger
ID: 12191850
The way I get files from my linux boxes to windows boxes is as follows.

Make sure their is the same username and password setup on both machines which permissions setup on the w2k box for that user

then modify the follow to meet your needs

smbmount //<server/foldermapping> ~/<foldermapping> -o username=<username>,password=<password>,uid=<username>,gid=<username>
s,fmask=600,dmask=700

the ~/<foldermapping> simply mounts in my home area, you could of course use the full path

/users/foo/<foldermapping>

then

cp /home/jdoe/mail/*.* ~/<foldermapping>/
cp /var/spool/mail/jdoe ~/<foldermapping>/

once its copied everything across I simpy run

smbumount /users/foo/<foldermapping>

this removes the mount point

I normally script this and then run it through cron so that each day and a set time it does it..

P.S. remember to remove the "<" ">"

I hope this is clear enough?

Gabe
0

Featured Post

WordPress Tutorial 2: Terminology

An important part of learning any new piece of software is understanding the terminology it uses. Thankfully WordPress uses fairly simple names for everything that make it easy to start using the software.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month10 days, 10 hours left to enroll

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question