Thread: Copy & md5 Shell Script

Reply to Thread
Page 2 of 10 FirstFirst 123456 ... LastLast
Results 11 to 20 of 91
  1. #11  
    Just loaded a new version of the script. See first post.

    I fixed a problem where the script wouldn't copy directories with a "." in the name like and RDM folder.

    Cleaned up the code a little so it should be easier for other people to modify for their needs.

    Also made md5 only look at files. It ignores anything that is not a file, like a directory. So again, please test and make sure it does what you need before using. Also, I always manually verify my md5 at the end, even if the script didn't give me any errors.

    I have been using this for everything lately and not having any issues. Used it for all Red media on a commercial recently and I was very happy. I mostly wrote it for Alexa media and sound, but I have been using it for a lot of stuff lately.

    I just found out it has a problem doing the md5 on OSX application. They are actually some type of hidden folder. I knew that, but never really looked into it. I was just grabbing folders to copy for tests and found this out.

    I am looking at ways to speed up the script now. If anyone has any ideas on how to improve the script let me know or just do it and share.

    Here is a link to another copy script on Reduser:
    http://reduser.net/forum/showthread....opy+md5+script

    I haven't tested this and it is much more complicated than my very simple script.


    Mahalo,
    Dusty
    Reply With Quote  
     

  2. #12  
    Senior Member Mike Prevette's Avatar
    Join Date
    Apr 2007
    Location
    New York, NY
    Posts
    1,687
    Any way to get it to not modify the Creation date of the copied file?
    _mike

    "One for a meal, One for the reel, or One to learn something"
    Reply With Quote  
     

  3. #13  
    Mike,

    I think cp -p will preserve the original file attributes. Atleast the attributes it can. You would just need to change "cp -R" to "cp -Rp" in the script.

    I wonder if that is something that should be a default part of the script?


    Dusty
    Reply With Quote  
     

  4. #14  
    Great script been thinking about writing something like this for ages myself. It might be great to have an option to save a temp file of the chosen destinations for the day so that they can be recalled instead of having to re-drop each time.
    Reply With Quote  
     

  5. #15  
    Rick,

    I thought about adding that, but I always have finder windows open with those folders for verify and QC, so it is super easy for me to drag them into the script. I would need to think about the best way to have the script deal with that temp config file.

    If you have an idea, feel free to add to the script and share your improved version.

    I am more focused on trying to make the copy faster right now. comparing cp vs cpio vs rsync vs tar piped to untar. I have found all kinds of recommendations online, but so far cp seems to be the fastest. I was looking for something to make a progress bar, but I haven't found a good solution for that yet.


    Dusty
    Reply With Quote  
     

  6. #16  
    Have you tried to get http://www.sveinbjorn.org/platypus working I had a quick look at it once and gave up but I'm sure its not that hard.
    Reply With Quote  
     

  7. #17  
    Dustin, I noticed that the script returns an error with any drive or folder names with spaces in them. Is there any way to get around that? I know I can change drive and folder names, just wondering if there's anything you can do with the scrip instead.

    Tim
    Local 600 DIT
    My Personal Portfolio:
    www.sutherlandprojects.com
    Reply With Quote  
     

  8. #18  
    Tim,

    Spaces in file and directory names are always a bad idea. Lots of app have problems with that.

    Let me see if I can come up with a solution.

    I have a new version of the script that tells you percent complete of each step. The code is all ugly. Once I get it cleaned up, I'll post it. I'll also look into the spaces thing.


    Dusty
    Reply With Quote  
     

  9. #19  
    SPACES thats why underscores were invented
    Reply With Quote  
     

  10. #20  
    I added a new version of the script (CopyScript_percent.sh).

    This version has a config file to keep track of where you want files copied to.

    It also tells you percent complete of each step of the copy process.

    I also changed the copy process to preserve the original file attributes.

    I am still testing this version. Everything seems to be working well. Please test this version out and let me know if anything needs to be fixed.


    Mahalo,
    Dusty
    Reply With Quote  
     

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