New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus • Advice and insight from world-class Apple enthusiasts • Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Operating System General OS operation information and support

Unconditional copy


Post Reply New Thread Subscribe

 
Thread Tools
TerrySmythe

 
Member Since: Oct 16, 2012
Posts: 12
TerrySmythe is on a distinguished road

TerrySmythe is offline
I'm attempting to copy about 20,000+ files from an external Windows (NTSC) hard drive, into my internal Mac drive. The copy process gets underway, reports it will take about 23 hours. About one hour into the copy, a fault is found with a file and the copy process simply stops, no option to continue.

In the Windows world, I can use XCOPY for such a situation, where I want to copy as much as it can without stopping.

On my MacBook (10.6.8), how can I execute an unconditional copy? And unattended, I can't babysit the process for 23 hours.

A Google search for "unconditional copy" for my Mac comes up empty.

Thoughts of others?

Regards,

Terry Smythe
Canada
QUOTE Thanks
chscag

 
chscag's Avatar
 
Member Since: Jan 23, 2008
Location: Fort Worth, Texas
Posts: 38,486
chscag has a reputation beyond reputechscag has a reputation beyond reputechscag has a reputation beyond reputechscag has a reputation beyond reputechscag has a reputation beyond reputechscag has a reputation beyond reputechscag has a reputation beyond reputechscag has a reputation beyond reputechscag has a reputation beyond reputechscag has a reputation beyond reputechscag has a reputation beyond repute
Mac Specs: 27" iMac i5, 3.2 GHz, iPad 3, iPhone 5c, 3 iPods, OS X Mavericks

chscag is offline
Your external drive is formatted to "NTFS" not "NTSC" (that's a TV broadcast standard). There may be a way to do it by using the Terminal (command line). Perhaps one of coder experts can come up with a way for you.
QUOTE Thanks
Mini_mi

 
Member Since: Mar 13, 2011
Posts: 224
Mini_mi is on a distinguished road
Mac Specs: 2011 MacBook Air, i5 27" IMac, 2010 21.5" IMac, 2010 Mini, 2011 13" MBP, IPhone 4, Airport Extreme

Mini_mi is offline
Hi TerrySmythe,

Look up Unison. I believe this will do what you need
QUOTE Thanks
Raz0rEdge

 
Raz0rEdge's Avatar
 
Member Since: Jul 17, 2009
Location: MA
Posts: 7,327
Raz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant future
Mac Specs: 27" i7 iMac, 24" iMac, 13" Macbook Air, iPhone 5 & 5S, iPod Nano 7th Gen, iPad 2 16GB WiFi, iPad 3

Raz0rEdge is offline
When the external drive is plugged in, it will show up in /Volumes with whatever the name of the drive is. So open up a Terminal window and look at the following commands. You will need to get some information before the commands will do anything, do not type them in blindly
Code:
cd ~/Downloads
mkdir Pictures_Import
cp -aR /Volumes/<name/of/external/drive>/* Pictures_Import
For the command line portion of this you can just use the ~/Documents folder and create a new folder to hold the pictures, as I've done above. Now the "cp" command will recursively copy everything from the external HD to Pictures_Import directory. If there certain sub directories on the external drive that you only care about, then you'll want to add those to the "cp" line.

For example, if the external drive is called "Storage", then the command would be "cp -aR /Volumes/Storage/* Pictures_Import", now if you had a directory on that drive called Pictures, then the command would change to "cp -aR /Volumes/Storage/Pictures/* Pictures_Import"

The * (star, asterisk) after the directory indicates all files..

--
Regards
...Ashwin



Be sure to read the Community Guidelines | The more information you provide, the better answers you get, remember GIGO.
QUOTE Thanks
cradom

 
cradom's Avatar
 
Member Since: Feb 14, 2004
Location: Nederland, Texas
Posts: 2,899
cradom has much to be proud ofcradom has much to be proud ofcradom has much to be proud ofcradom has much to be proud ofcradom has much to be proud ofcradom has much to be proud ofcradom has much to be proud ofcradom has much to be proud ofcradom has much to be proud ofcradom has much to be proud of
Mac Specs: 21in iMac core2 Duo- 13in macbook - 10.9 on both

cradom is offline
Actually you need to make it *.* just in case.
cp -aR /Volumes/Storage/Pictures/*.* Pictures_Import
Notice the space between *.* and Pictures_Import.

Craig Domingue - resident redneck.
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Toronto
Posts: 17,674
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

vansmith is offline
I suppose this question is for Razor and cradom - would you not want to add -f to force the copy in case of a bad/corrupt file? Would cp terminate if it hit something it couldn't copy or would it just continue?

Important Links: Community Guidelines : Use the reputation system if you've been helped.
M-F Blog :: Write for the blog
Personal Twitter
QUOTE Thanks
Raz0rEdge

 
Raz0rEdge's Avatar
 
Member Since: Jul 17, 2009
Location: MA
Posts: 7,327
Raz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant future
Mac Specs: 27" i7 iMac, 24" iMac, 13" Macbook Air, iPhone 5 & 5S, iPod Nano 7th Gen, iPad 2 16GB WiFi, iPad 3

Raz0rEdge is offline
The "cp" would only fail if it had a physical error reading the source files. I avoid using "-f" since that would overwrite any local files by force and doesn't actually control continuing one when an issue is encountered. If there is an underlying issue, then "cp" would halt/fail just like the Finder/UI was..

--
Regards
...Ashwin



Be sure to read the Community Guidelines | The more information you provide, the better answers you get, remember GIGO.
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Toronto
Posts: 17,674
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

vansmith is offline
Gotcha. I've never really had an issue with cp so I wasn't sure.

So, if cp is going to fail like Finder would, how would this solution help?

Important Links: Community Guidelines : Use the reputation system if you've been helped.
M-F Blog :: Write for the blog
Personal Twitter
QUOTE Thanks
cradom

 
cradom's Avatar
 
Member Since: Feb 14, 2004
Location: Nederland, Texas
Posts: 2,899
cradom has much to be proud ofcradom has much to be proud ofcradom has much to be proud ofcradom has much to be proud ofcradom has much to be proud ofcradom has much to be proud ofcradom has much to be proud ofcradom has much to be proud ofcradom has much to be proud ofcradom has much to be proud of
Mac Specs: 21in iMac core2 Duo- 13in macbook - 10.9 on both

cradom is offline
You might want to use ditto as it says it doesn't give up (man ditto).
ditto sourcedir destdir

Craig Domingue - resident redneck.
QUOTE Thanks
TerrySmythe

 
Member Since: Oct 16, 2012
Posts: 12
TerrySmythe is on a distinguished road

TerrySmythe is offline
Many thanks for the help that has emerged, appreciated. So far, nothing seems to work at all.

* my MacBook 10.6.8
* Source - external NTSF Hard drive
* NTSF's name is "Emachine"
* Target directory - "/Documents and Settings/User/My Documents/*.*

This external hard drive CANNOT be seen/read on my Windows computer, but my MacBook does see it and I can extract random files off it onto a USB thumb drive. My objective is to extract some 20,000+ files (64gigs) from the "My Documents" directory, into my MacBook, so that I can write all those files back out to my main Windows computer, through my home network.

In my MacBook, I've created a new folder "Temp" to receive everything. Trouble is, when using a simple drag/drop, there are a few files that create the following error:

The Finder can’t complete the operation because some data in “TEMPLATE6.pub” can’t be read or written.
(Error code -36)

When that error is encountered, the copy process comes to a complete halt, with no option to continue.

So far, all attempts to use the cp command through Terminal have failed completely, each attempt simply generating the correct syntax I should be using. Not a single file has transferred so far.

I'm hopeful of coming up with a command string that will tell the cp command to pass over an error file and keep going until all is done some 23 hours later, all unattended.

BTW, I'm doing this for a friend.......:-)

Regards,

Terry Smythe
Winnipeg, Canada
QUOTE Thanks
TerrySmythe

 
Member Since: Oct 16, 2012
Posts: 12
TerrySmythe is on a distinguished road

TerrySmythe is offline
Just tried ditto:

ditto /Emachine/Documents and Settings/User/My Documents/* Temp

did not work: can't get real path for source

ditto /Volume/Emachine/Documents and Settings/User/My Documents/* Temp

same error: can't get real path for source

Thoughts of others?

Regards,

Terry Smythe
Winnipeg, Canada
QUOTE Thanks
IvanLasston

 
IvanLasston's Avatar
 
Member Since: Feb 26, 2010
Location: Rocky Mountain High, Colorado
Posts: 2,116
IvanLasston is a splendid one to beholdIvanLasston is a splendid one to beholdIvanLasston is a splendid one to beholdIvanLasston is a splendid one to beholdIvanLasston is a splendid one to beholdIvanLasston is a splendid one to beholdIvanLasston is a splendid one to beholdIvanLasston is a splendid one to behold
Mac Specs: 1.8 GHz i7 MBA 11" OSX 10.8.2

IvanLasston is offline
For *NIX based wild cards *.* is redundant - * will cover everything. Really * is match everything. '.' matches a single "anything" So in old dos days you needed *.* when the . was counted as a separator but you don't need that in modern *nix based systems. When you say *.* you are saying match anything - anyway.
Mac OS X Commands and Wildcard Characters « Mac Apple Tips
(You could see there is an example to pick only files *\.*) but that is an escaped . meaning find only files with dots in them but you don't have to keep that convention.

According to this - the -R should keep copying even with errors
Loading…
So it may be lower level than that.

I had used flow when moving around a large amount of data - seemed to work quite well as it was designed for ftp/sftp but it would move data across local locations too.
Flow &mdash; The Mac's Best FTP + SFTP Client
$5 in the appstore - I got it with a bundle so that is why I had it. It worked for me - even with errors but if even cp -R doesn't work then I'm not sure anything will.
QUOTE Thanks
IvanLasston

 
IvanLasston's Avatar
 
Member Since: Feb 26, 2010
Location: Rocky Mountain High, Colorado
Posts: 2,116
IvanLasston is a splendid one to beholdIvanLasston is a splendid one to beholdIvanLasston is a splendid one to beholdIvanLasston is a splendid one to beholdIvanLasston is a splendid one to beholdIvanLasston is a splendid one to beholdIvanLasston is a splendid one to beholdIvanLasston is a splendid one to behold
Mac Specs: 1.8 GHz i7 MBA 11" OSX 10.8.2

IvanLasston is offline
Are you sure you can get to that path? Usually you have to escape spaces with a \

So you would want to do

ditto /Volume/Emachine/Documents\ and\ Settings/User/My\ Documents/* Temp
QUOTE Thanks
TerrySmythe

 
Member Since: Oct 16, 2012
Posts: 12
TerrySmythe is on a distinguished road

TerrySmythe is offline
Tried ditto:

ditto /Volume/Emachine/Documents\and\Settings/User/My\Documents/* Temp

error: can't get real path for source

ditto /Volume/Emachine/Documents and Settings/User/My Documents/* Temp

error: Can't copy directory /Users/terrysmythe/Microsoft User Data into a file Temp


I'm still trying.

Regards,

Terry Smythe
Winnipeg, Canada
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Toronto
Posts: 17,674
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

vansmith is offline
Quote:
Originally Posted by TerrySmythe View Post
ditto /Volume/Emachine/Documents\and\Settings/User/My\Documents/* Temp
You need spaces:
Code:
ditto /Volume/Emachine/Documents\ and\ Settings/User/My\ Documents/* Temp

Important Links: Community Guidelines : Use the reputation system if you've been helped.
M-F Blog :: Write for the blog
Personal Twitter
QUOTE Thanks

Post Reply New Thread Subscribe


« iTunes Syncing | Operating on output of ls in loop »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
copy itunes shared music aamir OS X - Apps and Games 0 09-14-2007 05:46 PM
Want to compelte copy DVDs, convert for iTunes fleurya Movies and Video 1 07-21-2007 07:17 AM

All times are GMT -4. The time now is 09:14 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?