• Sign in to Neowin Faster!

    Create an account on Neowin to contribute and support the site.

Sign in to follow this  

How to force move file, skip if can't be moved?

Recommended Posts

Dinggus    340

One of my HDD's is failing and I have been trying to move files from it to another external HDD. The issue is, I'll select say 50 files, and leave my computer but come back to an error and see either a few files or none were able to be copied over.

 

I believe there is a command to force move files, and if they can't then it gets skipped. Does anyone know it?

 

Edit: Found out I can use the rsync command or Carbon Copy Cloner, so I'm trying the program out first.

Edited by Dinggus

Share this post


Link to post
Share on other sites
Jim K    14,444

Powershell ... 

 

Move-Item <source> <dest> -force

Share this post


Link to post
Share on other sites
Dinggus    340
2 minutes ago, jjkusaf said:

Powershell ... 

 

Move-Item <source> <dest> -force

Powershell, you mean Terminal?

Share this post


Link to post
Share on other sites
Jim K    14,444
Just now, Dinggus said:

Powershell, you mean Terminal?

oh freak...sorry!  I just saw this in the Community Activity and didn't notice it was for Apple...so I responded with the Windows answer.  Sorry!!!

Share this post


Link to post
Share on other sites
Dinggus    340
2 minutes ago, jjkusaf said:

oh freak...sorry!  I just saw this in the Community Activity and didn't notice it was for Apple...so I responded with the Windows answer.  Sorry!!!

Lol, all good. I was trying the commands in Terminal anyways.

  • Like 1

Share this post


Link to post
Share on other sites
Jim K    14,444

Sorry (not that familiar with Apple)...you may find your answer here...unless someone else gives you a suitable answer.

http://hints.macworld.com/article.php?story=20100212171620210

 

Apple has rsync right?  I use it on my FreeNAS (FreeBSD at the core) to mirror my two Volumes.  Basically...what this will do is everything on the source is mirrored onto the destination...anything on the destination that isn't on the source will be deleted.  You shouldn't receive any prompts (I guess...once again I'm not familiar with Apple).

 

My particular rsync command is.....

 

rsync -av --delete /mnt/LargeMedia/ /mnt/BackupMedia/

 

-a archive

-v verbose

--delete - deletes files on the destination that aren't on the source

 

This line is similar but gives me a log file which I can go back and look at later.

 

rsync -av --delete --log-file=/mnt/LargeMedia/zLog/transfer.log /mnt/LargeMedia/ /mnt/BackupMedia/  

 

Full rsync documentation can be found here...

https://www.samba.org/ftp/rsync/rsync.html

 

Might be an option.  Sorry again for jumping in here so quick without realizing it was for Apple. :)

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.