Skip to content


SmartCopy is a utility I really never expected to have to write myself.  It’s function is to manipulate files in a large, deep directory structure selectively and (hopefully) intelligently.  Operating systems’ native interfaces all seem to do a poor job of this, and the alternative tools I’ve tried all seem flawed one way or another.  I hope SmartCopy provides an improvement on existing utilities – it certainly fills my needs better than anything I’ve tried.

To download SmartCopy, please visit the project site at SourceForge.

What are the functions that SmartCopy provides?  It’s basic job is to provide selective backups of a directory structure.  I initially wrote it to help populate a small mp3 player (20gb) from a very large mp3 collection (500gb) – a task which seems unnecessarily difficult using Windows Explorer (for example).  Perhaps I have an uncommonly large media collection, or perhaps I organise it rather more obsessively than others, but it does surprise me that this task does not have a wealth of utilities designed to make it as efficient and painless as possible (I count iTunes as an example of an extremely bad utility for the purpose).

The more general case I use the tool for is maintaining backups.  I backup parts of my collection on to a variety of devices – large stores for permanent backups, portable drives for mobile libraries, etc.  It also useful for general organisation and maintenance of any large collection of files.

An example usage would be maintaining an incremental backup.  The steps involved in this would be:

1.  On startup, select the directory you wish to backup (source).

2.  Use the ‘Filter Mirrored Paths’ option and select your target directory.  This will compare the directories, and filter out any files/folders already present in the target from the source view.

3.  Select all files and folders which remain by checking the root node of the source view (all subfolders and files will automatically be checked)

4.  Use copy selected files to transfer any new files (and any modified files, if ‘Allow Overwrite’ is checked and ‘Ignore Size’ is not)

5.  Use ‘Find Orphans’ to locate any files in the target which are not present in the source (this automatically switches the view to the target folder)

6.  Select the root node and use ‘Delete Selected Files’ to eliminate them.

Filtering mirrored files and folders

Filtering mirrored files and folders

These steps are common enough as a process that there is a single command in the menu which performs exactly those operations – ‘Synchronise Directory’.  With a little imagination, the individual operations combined with others and filters can be used to perform more interesting operations, e.g. to split a mixed media directory into separate trees for audio and video, or to backup, move or delete only those files and folders which are different in the source from some other directory.

Some advantages of using SmartCopy for these sorts of operations include:

  • Comparisons and filtering are done up-front, so you know you are not going to be bothered 2 hours in to a long backup with a prompt asking if you want to overwrite something.
  • Long operations can be paused and resumed – useful if you’re doing a backup over the network and need to temporarily free up bandwidth to make a Skype call, for instance.

Removing Mirrored Paths Status

In the latest versions, your selection can be saved and restored to a text file, or in an extended format compatible with m3u playlists.  This makes SmartCopy a very useful tool for building playlists to sync with an ipod (or other media player), allowing whole albums and artist collections to be selected with a few clicks, and showing you how many files will be copied and what their total size is, to make sure your mp3 player is just as full as you want it to be.

The original version of the tool was written in Python back in 2007, when cross-platform compatibility seemed important to me.  However, I found that Python’s cross-platform capabilities did not out-weigh the inconvenience of not having Python installed on other machines I wished to copy parts of my media collection on to when I was travelling.  Since I wanted to learn some C# and .NET, I decided that converting SmartCopy to that platform was a useful exercise with a practical end product.  Hence, the latest version is written in C# and targetted for .NET runtime 4.0.

  1. How do you compare this with tools like Robo Copy. I am really trying to understand the purpose. Please do not take my words otherwise but I want to review this and looking for strong points when compared to other tools.

    • Hi Ashish, some advantages that SmartCopy has over RoboCopy:

      – Tree structure makes it quick and easy to copy only a part of a structure
      – Up-front comparison (removal of mirrored paths) allows you to quickly see which files are ‘new’, and which already exist in the target
      – When you select the paths to copy you can see how many MB/GB will be copied before you start, so you can make sure you’re not going to run out of disk space
      – Filters and selections allow you to copy only the files you want (e.g. copy mp3 files but not FLAC, jpg etc)
      – Find orphans allows you to check for any files in the target which aren’t in the source, and selectively choose to delete them, copy them back to the source, move them to another directory or leave them where they are

      Plus, the new feature to export your selection to a txt or m3u file allows you to make a playlist which can easily be synced to your ipod, a process which itunes and other tools I’ve tried makes very laborious.

      To the best of my knowledge there’s no other tool which provides the same power and flexibility, whilst maintaining a simple and streamlined user interface.

  2. Hugh Macmillan permalink

    Dear Simon,

    I read about this tool on ghacks. I decided to give it a whirl as I am currently moving and copying a large number of files between partitions.

    My first experiment was successful. I copied a directory with sub-directories full of portable document files (PDFs) to another partition with a folder entitled PDF freshly created for the expperiment.

    The second experiment was not so successful. I found a large number of PDFs which had no folder and decided to try the filter option – *.pdf. I saw the PDFs all in the right hand pane which I wanted to copy and chose to copy them to the PDF folder mentioned above.

    This was successful to a certain extent. The files were all copied over but they did not enter the PDF folder. They were all copied like this with a prefix of PDF on the file name.

    For example the original file screenplay.pdf appeared as PDFscreenplay.pdf in the target folder.

    I’m sure I am doing something wrong. Can you advise me please?

    Much thanks for the program,


  3. Hi Hugh, thanks for the bug report, which was caused by a difference in the way Windows treats files in the root directory of a drive, which I’ve now compensated for. There is a new version on Sourceforge which addresses it.

  4. mike permalink

    Hello Nice tool that “works”/ Thanks.

    You should know that this too is also good for copying directories to many Virtual Machines.

    On your next version I’d like to see a way to add multiple destinations such as

    Source: C:\MyFiles

    Destination: VM1\C:\MyFiles

    Also a Way to Save my work so I don’t have to repeat this.

    creat a post on , or older MS Hyper V.

    This has been exactly what I’m looking for thanks.


  5. Athe permalink

    Great tool!!! In addition to mikes suggestion, if we could add a multi source to single destination setting. use case: i have multiple students submit files on individual USB sticks and would like to copy specified folders and /or files to a single destination in an automated way. the files are normally named with the student’s ID number to avoid clashes.
    extending this to deal with contingencies/other uses will be to include settings to deal with multiple identical named source files. e.g. when several students name it ‘assignment1.doc’ instead of their id – by providing an option to auto re-name on the fly by appending a number/letter of my choosing. Another use case may be collecting only the latest/biggest version of files from multiple source drives to a destination folder so a few different options will help there too (e.g latest modified date, a specific date or date range, specific file size or range, biggest etc).

  6. Don permalink

    Aloha, I don’t see an option to filter by date – I would like to copy files that are over three years old to a new folder/subfolder. Am I missing something?

    • Hi Don, there isn’t currently any option to filter by date… I don’t tend to find Windows timestamps reliable enough to be useful, so haven’t ever felt the need to add functionality relating to them. I’ll have a quick look to see how hard it would be to add something though 🙂

    • The new version has the option to filter files which fall outside a desired date range… it can be applied multiple times to hone in on the exact date range(s) you want 🙂

  7. Raphito permalink

    Hi Simon
    Great tool, thank you very much! Every time when I copy files to my windows phone I think “damn, I have to write a useful tool so I can do it more efficent”… RichCopy is a good choice too, but it is not very userfriendly.
    Unfortunately your tool cannot copy directly to a memory card installed in my windows phone and connect via USB (RichCopy isn’t able to do that too). I simply cannot select any folder on the phone with the dialog. Do you have any idea why this is? My first thought is that maybe windows uses some special URI to address the phone. Maybe I try to debug the code when I find some time. I have seen it is public RO rights on the SVN.
    Regards and thank you!

    • Hi, glad you’ve found it useful 🙂 Not sure about the Windows phone issue, don’t have one to investigate I’m afraid. If you can find a solution please get back in touch – I’m happy to have other contributions to the project, so I will grant write access to the repository if requested.

  8. Marc G permalink

    Strongly suggest you change ‘remove’ to ‘hide’ !!!! I keep freaking out that it is removing files in my source folder!!!

  9. Uploaded a new version – that’s two in one year!

    – Added ‘ignore extension’ operation
    – Fixed crash when selecting a folder that has been deleted outside the app
    – Updated readme.txt

    • My Norton claims this is infected with WS.Reputation.1 and quarantines the file. Can’t find a direct email for you – so I’m just commenting… — Michael Tighe (

      • Thanks for the heads up – “WS.Reputation.1” is not actually a malware detection, it just means that Norton doesn’t really know what the file is because it hasn’t come across it very often, I think:

        “The system considers many aspects of a file, including file age, file download source, digital signature, and file prevalence. These attributes are combined using a proprietary algorithm to determine a file’s safety reputation. The system maintains a rating for all files rather than just malicious files.”

        I’ve submitted the latest version to Symantec for whitelisting.

  10. Alex Diaz permalink

    Great tool, I only have a little problem… How can I make if I want to copy all the files to a single directory (I mean don´t create subfolders in the target directory)…. Can you tell me if there is a way to do that?…. Thanks in advance

    • Hi Alex, a good question… it’s not a scenario I’d considered, so there’s no provision to do it at the moment I’m afraid!

  11. alec navisi permalink

    Dear Simon, I am actually searching a nice opensource tool for studying programming languages.
    I found your tool and I am charmed about this.

    So I decided to use it for studying C#.

    Maybe could you be so nice to upload the source for last uploaded exe to sourceforge?

    Kindly regards, alec

    • Hi Alec, good catch… had got disconnected from the sourceforge repository and was only updating a local repository with recent changes!

      I’ve reconnected and uploaded the source for the last revision. Keep in mind it was my first C# project, so it’s probably not the best tool for learning C# from!

  12. I have looked for something like this for ages! Should have searched better! Thanks a lot for creating this software!

  13. New version released:
    – Automatically save and restore selection when rescanning.
    – Optionally autoselect files in selected folders when restoring selection.
    – Remove selection from text file function.
    – Support moving files and folders within the same directory structure.

  14. Thanks Mike, a good idea… I’ll have to dust off the source code and add a ‘batch update destinations’ function soon 🙂

  15. alec navisi permalink

    Hi Simon, I found a little bug:
    SmartCopy have troubles with very deep paths, during the copy process:

    In the source of a similar tool, made for removing deep paths, I saw a possible solution:

    It creates paths with unc style :

    string currentFolder = @”\\?\” + targetDirectory;

    ************** Exception Text **************
    System.IO.PathTooLongException: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
    at System.IO.PathHelper.GetFullPathName()
    at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
    at System.IO.Path.GetFullPathInternal(String path)
    at System.Security.Util.StringExpressionSet.CanonicalizePath(String path, Boolean needFullPath)
    at System.Security.Util.StringExpressionSet.CreateListFromExpressions(String[] str, Boolean needFullPath)
    at System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, AccessControlActions control, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList)
    at System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, String path)
    at System.IO.FileSystemInfo.get_FullName()
    at SmartCopyTool.FileCopier.DoWork()
    at SmartCopyTool.Worker.Invoke(BackgroundWorker bgw)
    at SmartCopyTool.Form1.backgroundWorker1_DoWork(Object sender, DoWorkEventArgs e)
    at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
    at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)

  16. Hi Alec, that’s quite a deep path … if you find a way to fix SmartCopy for such deep paths please let me know, or update the repository 🙂 I have no time to look at it at the moment :-/


Trackbacks & Pingbacks

  1. Smart Copy, copiare file da cartelle di grosse dimensioni |
  2. Smart Copy : Copy Pause & Preview Conflicts before copying Deep directory structure
  3. SmartCopy te Permite Copiar Grandes Cantidades de Archivos | POWERPYMES
  4. Simon’s Blog « machinewrapped
  5. SmartCopyTool – un tool per eliminare spostare i files

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: