Script to automatically duplicate files/folders?

I can't search this on Google because of all of the "duplicate removal" scripts, so I'm asking:
I have a folder that is changed very often that is not very large. I need to keep backups of it frequently (I'd say twice or thrice a day). Currently, I just regularly go to it and press CMD+D, but that requires manual control of course.
Is there a way with Automator, Applescript, shell scripts, or even Pascal to automatically DUPLICATE the folder at intervals so that it also keeps the old versions? Like exactly how a human would keep using CMD+D. It would say "folder copy" then "folder copy 1" then "folder copy 2" etc... I don't know how to send a "duplicate" command to Finder using these scripts.

nvm found it

Similar Messages

  • JUST finding duplicate files/folders

    Yes, I did my research.  Solutions are dated or otherwise un-satisfactory.  Does anyone know of a CURRENT app. that will find duplicte files and folders (preferably by name, not necessarily size) and list them without immediately sending something to the trash?  What I need it for is this:  I have an external hard drive that I've manually backed things up to over the years, and there are different "versions" of the same files.  I want to get rid of the older ones and keep the most updated ones.  Does that make sense?  If you need more info, ask.  Anybody got an idea?

    Yeah, unfortunately that was how the action was programmed - to only accept two folders to compare at a time.
    Honestly, I re-reviewed your earlier posts, and what you want is the most recent version of the files right?
    As you have 4 folders, then what I think you should do is the following:
    1. First select the first two folders and run the below workflow:
         What this will do is synch both of them so that the most recent files are there. Then all you have to do is delete one of them as they will be DUPLICATES.
    2. Then select the OTHER TWO FOLDERS with the same workflow above and sync them. Then delete one of the folders.
    3. Now you only have two folders left to sync. Run the workflow on those two folders and delete one of them.
    There you go, and you will end up with ONE folder that has all the most recent versions of the files.
    You should test it first, but it should work.
    Good luck.

  • Custom File Management Task for Duplicate files

    Hi
    I have ran a report on Windows server 2008R2 File and Print Server and we are wasting a lot of space on our file server due to duplicate files. I would like to run a custom file management task to move duplicate files to a different location. Do you know
    any scripts i can run in in custom file management tasks which I can use?

    Hi, 
    Please see PS script to find duplicate files in http://powershell.com/cs/blogs/tips/archive/2009/01/11/finding-and-deleting-duplicate-files.aspx
    Unfortunately we don't have any tool from MS to find duplicate files.But we have many 3rd party software, download & use it if your are interested?
    http://www.ashisoft.com/
    Regards, Ravikumar P

  • Script to "Optimize to file size" (automatically) in "Save for Web"?

    Hello, all,
    I'm a novice when it comes to scripts in Photoshop, but I'm really coming to the conclusion that this is the only way to automate the actions I need to do, whithout having to do it one-by-one.
    Is it possible to write a Script to automatically choose the option (and settings) to "Optimize to file size" in the "Save for Web" dialog?
    Is it also possible to save the file in the document's original folder, instead of a single specific folder, using "Save for Web"?
    I have a really big number of different files (some .JPEG, some .PNG, some .TIFF) and I need to generate a single "reference.jpg" in each one of those original folders. It's quite easy to use whatever method to separate all those files in some lists and later open them in Photoshop in small subgroups of files.
    I only have a restriction of size (60Kb) for those "reference.jpg" files, and I would like to save all of them, in each document original folder, with the best possible quality within that size constraint.
    Here's my problem:
    I can easily do that with a very simple action, but, that specific way, I have no control whatsoever over the resulting filesize of those "reference.jpg" files generated. Moreover, I also find the "save for web" command create a more "slim" file, allowing for better quality within my size constraint.

    c.pfaffenbichler wrote:
    "I can’t make that out in the ScriptingListener code, but maybe someone else knows better or has a Script for the task already.
    I seem to remember a thread where it was discussed to save a copy, check its size and overwrite it with different settings if it was too big … that should be possible, but may run longer."
    Many, many thanks for your reply, c.pfaffenbichler!    I spend the whole day (and night) yesterday learning (or rather trying to learn) about javascript, OOP, and how it should be applied in Photoshop's Scripts.
    I was able to modify some snippets of code I found on the web to suit my needs (temporarily):
    //SaveforWebSP.jsx
    //Save a fixed width image with a size constraint in its original folder
    var docRef = activeDocument;
    var outputFolder = docRef.path;
    NamesaveRef = new File( outputFolder + "/reference.jpg" );
    var NewfileRef = new File( NamesaveRef )
    // quality/size constraints
    var w = 300; // new file width
    var MaxSz =  61440; // max. 60Kb
    var Qlt = 100; // initial quality 100
    var x = 1; // decreasing step
    // resize the image to the right width
    docRef.resizeImage(UnitValue(w,"px"),null,100,ResampleMethod.BICUBICSHARPER);
    // Perform the first SaveForWeb Operation
    ExpWeb(NewfileRef, Qlt);
    // Keep trying to save the file with max. Qlt, but under MaxSz   
    while (NewfileRef.length > MaxSz)
          Qlt = Qlt - x;
          NewfileRef = new File( NewfileRef );  
          NewfileRef.remove();
          ExpWeb(NewfileRef, Qlt);  // Perform a new SaveForWeb Operation, with slightly lower Qlt
             if (Qlt <= 50) {
               alert("The file can't be saved with the desired size AND quality.");
               break  // break the loop whenever the quality is as low as 50 (this shouldn't need to happen)
    var FileSz = NewfileRef.length/1024;
    FileSz = Math.round(FileSz);
    // close the original file without saving
    activeDocument.close(SaveOptions.DONOTSAVECHANGES);
    // SaveForWeb Export, with the desired constraints and parameters
    function ExpWeb(FileNm, Qlt)
          var options = new ExportOptionsSaveForWeb();
          options.quality = Qlt;   // Start with highest quality (biggest file).
          options.format = SaveDocumentType.JPEG;   // Save Format for the file
          docRef.exportDocument(File(FileNm), ExportType.SAVEFORWEB, options);
    This works, but it takes a long time and keep the HD disk "going crazy" during the time it is processing the images.
    This is too bad, because the "Optimize to file size" dialog in the "Save for Web" would have been so much faster, efficient and much less "disk-intensive"...

  • Apple Script to rename single files in folders

    Hey guys, I am trying to write a script to automatically rename a lot of files.  Here is the situtation:
    I have a MainFolder with many SubFolders inside.  Inside each SubFolder is 1 word document.  Is there a way to write a script that automatically renames each of of those word documents to its folder's name.  Example.
    BEFORE:
                      -SubFolder1 - 1.doc
                      -SubFolder2 - 1.doc
    -MainFolder -SubFolder3 - 1.doc
                      -SubFolder3 - 1.doc
    AFTER:
                      -SubFolder1 - SubFolder1.doc
                      -SubFolder2 - SubFolder2.doc
    -MainFolder -SubFolder3 - SubFolder3.doc
                      -SubFolder3 - SubFolder4.doc
    Thanks.

    The following script should do what you are asking for:
    set mainFolder to choose folder
    tell application "Finder"
        repeat with thisFolder in (get folders of mainFolder)
            try
                set name of (file 1 of thisFolder whose name extension is "doc") to (name of thisFolder & ".doc")
            end try
        end repeat
    end tell
    If there's just one file in each subfolder (wich is not exactly the same as “one Word document”), you could remove the “whose name extension is "doc"” filter.

  • Need a perl script which monitors a network folder and sends email when new files/folders arrived...

    I need a perl script (or something else better) which monitors a network folder and sends email when new files/folders arrived. I tried it in Automator but failed.
    Thanks!

    Yes. I tried it. But whenever I restart m Mac, the watch folder doesn't work until I reconnect to network or run the Automator... I need a simple system that automatically connects to the network and monitor the folder, even I restart the Mac.
    Thanks!

  • Can't figure out why the "Do this automatically for files like this from now on" is disabled Compressed (zipped) Folders

    I recently had to uninstall and reinstall Firefox. Now with the new version it will not allow me to click the check box "Do this automatically for files like this from now on". The line is disabled and a light gray. I went into the Applications tab under options and can't find the Compressed (zipped) Folders file type either.
    I download a bunch of files for work and to have to click is going to be the biggest pain. Any help will be greatly appreciated!!

    Screenshot:

  • I recently deleted many duplicate files. In the midst of it my Itunes songs are not in Itunes. They are in two different folders. One under 'Music' in my ID. And two under a MyMusic file in Documents. How do I know which one to import?

    I recently deleted many duplicate files. In the midst of it my Itunes songs are not in Itunes. They are in two different folders. One under 'Music' in my ID. And two under a MyMusic file in Documents. How do I know which one to import?

    Thanks, this is not an ideal answer but probably the most sensible one in my case.
    I will try it unless someone has a better suggestion, but I'll wait a bit as it will take me a few days anyway (I had actually tried to create a new smaller playlist or download by album, but at this stage the music app is not letting me queue a list of songs for download - I think I will have to disable and re-enable iTunes match which will probably delete all the songs).
    I have to say I am not very impressed with Apple here - having an online backup of all your data and beeing able to restore it to a new device easily was a strong selling point of iCloud. For music, they are Definitly not delivering at the stage.

  • How do I keep my macbook pro from automatically rearranging my folders and PDF files on my desktop

    How do I keep my macbook pro from automatically rearranging my folders and PDF files on my desktop?  It seems to happen a lot after I've hooked my laptop to my Thunderbolt in my office and then I unhook my laptop to go present at a clients of taking my laptop home to work.  Every once in a while if even places all of my folders and PDF files in the far upper left corner of my screen.  Needless to say, having to constanly rearrange my desktop is extremly annoying and would love to know what the fix is for this problem.  Thank you in advance for any help offered!

    Thanks for the tip "baltwo", unfortunately my desktop settings were already set to NONE.  I've had one of my IT guys here this moring helping me look through all of this and we're at a wall trying to figure out why it's doing this.  This morning when I docked to the Thunderbolt all my folders and PDF files are in the upper lefthand corner stacked on top of each other almost out of view.  If I go to settings, displays, and swith to mirroring, all the folders and files go right back to where they're set up on my MacBook desktop, but I lose the ability to utilize the entire screen of the Thunderbolt.  Very frustrating to say the least and after searching through and reviewing several forums, Apple is very much aware of this issue and seems to be keeping silent on the issue.  Hoepfully they'll launch a fix soon!
    THANKS again for the tip, it's much appreciated!

  • I have a number of duplicate files in various folders on my Air - is there  way to find them and delete them?

    Mac Air 1.7 GHz i5  4GB Mavericks 10.9.5
    I have a number of duplicate files in various folders on my hard drive.  Is there an easy way to find them and delete the dups?
    Thanks

    EasyFind – Spotlight Replacement

  • Win7: Duplicate phone file folders in Explorer

    Hi,
    When using Windows 7 with it's native bluetooth stack + Ovi suite, you end up getting two file folders in the Explorer window:
    First one is a native Windows 7 feature, second one came after Ovi installation.
    Now while I really appreciate the folder Ovi featured (it's nicer, faster and everything), the situation with having two folders makes it at least cluttery.
    Is there any possibility to remove the first folder?
    (this question goes both to other users knowing the fix and to developers - in case they would be willing to code such hide-duplicate-icon feature in the upcoming release)
    The problem described above has one more effect: when I use TotalCommander to browse my files and I want to connect to my phone, I'm given two choices (corresponding to the above options), but since name is the same, I cannot differentiate them and choose the faster-working one at entry:

    Welcome to AD!
    Is your new laptop Vista, and the older desktop XP?
    If so, they have different paths to the default library.
    On XP, it's c:\Documents and Settings\ username \My Documents\My Music\iTunes\iTunes Music
    On Vista, it's C:\Users\ username \Music\iTunes\iTunes Music

  • Passing Files/Folders to BASH script...

    I'm trying to pass a list of files and folders selected in finder to a bash script so that I can use VLC to perform some transcoding and concatenation on them.
    I'm using "Get Selected Finder Items" to pass the "Files/Folders" output "As Arguments" to my script.
    Problem is with spaces in the filenames. Apparently Automator delimits the list of files with spaces. So I have spaces in the filenames and spaces between the files. So my bash script just sees a list like this:
    /Users/johnt/Documents/3rd Party Audio For Conversion/WFWC - 3.6.2009 3.7.2009/01c Director Report March 6 2009.wav /Users/johnt/Documents/3rd Party Audio For Conversion/WFWC - 3.6.2009 3.7.2009/01b Comm Disc Mar 6 2009.wav
    ...with no way to differentiate each file. Is there a way to tell automator to escape the spaces in the file paths so that my loop doesn't try to run through $@ as:
    /Users/johnt/Documents/3rd
    Party
    Audio
    for
    ... etc etc
    Thanks

    Thanks Neil, that was helpful. I'll play with that AppleScript and see what happens.
    I figured this was better suited in the Automator forum since I'm trying to format the output of what Finder sends before it ever hits the Bash script. My Bash script itself has no problem, so I didn't see any point going over to the UNIX forums.
    You gotta love the ability of OSX to be able to handle all sorts of technologies and integrate them well. Apparently, there's nothing Apple can do to make it's users do the same thing.

  • How to automate removal of Duplicate files

    Is there a way to automate the removal of duplicate files with LR2?
    In my catalog of 62,000 files I have 7,300 that I believe are duplicates.
    They are proprietary RAW files (CR2). I have the same files as DNG. At least I think I do.
    My intention is to have all my RAW files as DNG only.

    If you believe all of you CR2's are duplicates, just filter All Photographs by file type and delete all Raw's.
    If you have unique CR2's (that have not DNG equivalents) you'll ned a third party utility that is able to detect duplicates ignoring the extension. Delete duplicates from drive, then use Synchronize Folder to remove missing files from catalog.

  • When new CD are inserted, posible too automaticly copy files too folders??

    Hi.
    I get a lot of cds from customers.. Is it possible too get all the files/folders on a cd too copy automaticly too my desktop and then eject it???? I am soooo tired of doing this manualy:-D If it are posible too also put the files inn a folder with the name of the CD + Date it woud be too GOOD:-)
    Best regards
    Einar

    einar,
    Yes this is possible with an AppleScript or AppleScript/Automator combination.
    The challenge will be determining whether this is a new cd or not. Without knowing everytime you insert a cd it will copy the files to the desktop/folder. There are at least two ways around this:
    1) Have a database that keeps track of the CDs that have been processed;
    2) Have a dialog that comes up once the CD is recognized and lets you decide whether you want to process the cd or just mount it.
    I will see what I can come up with using the second method.

  • Apple script to find all duplicate files

    Is it possible to write an applescript to find all duplicate file names on my hard drive? My hd is almost full, and if I can delete duplicate files, it'll save me from having to buy another external drive.
    Thanks,
    George

    Why would you have found 20GB of duplicate images?  iPhoto has built-in duplicate detection, it can remove any duplicates or prevent them from being imported altogether.  Did you disable this in iPhoto for some reason?  Or were you still using folders and subfolders to store your photos?
    Just because two pictures have the exact same filename does NOT mean they are identical.  If this application you used simply compared their filenames, it's possible you actually lost all those photos and not just some duplicates.  ;(  Because many cameras reuse filenames after a certain point! 

Maybe you are looking for