Skip to content

SmartCopy

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 ‘Remove 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.

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.

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.

7 Comments
  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,

    Hugh

  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.

Trackbacks & Pingbacks

  1. Smart Copy, copiare file da cartelle di grosse dimensioni | IdeaGeek.it
  2. Smart Copy : Copy Pause & Preview Conflicts before copying Deep directory structure
  3. SmartCopy te Permite Copiar Grandes Cantidades de Archivos | POWERPYMES

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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

Follow

Get every new post delivered to your Inbox.