Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 10, 2016, 08:14:49 PM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: IDEA: Synch Folders NOT files  (Read 4050 times)

CleverCat

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,158
    • View Profile
    • Donate to Member
IDEA: Synch Folders NOT files
« on: April 22, 2007, 09:08:05 AM »
I have yet to find a programme that will synchronize Folders by name and not the files in them.

This would be useful when backing up to a USB drive apps which contain lots of Folders for skins -  like Window Blinds/Rainlender etc....the files inside are not important. I use Free Commander and it's great but cannot compare/synch a whole folder in side by side panes. :(

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 886
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
Re: IDEA: Synch Folders NOT files
« Reply #1 on: April 22, 2007, 02:28:18 PM »
 :) Try this "DOS" command:

XCOPY <source> <target> /E /T
Skrommel
Please stop by my site at  1 Hour Software by skrommel  for downloads and more info.

CleverCat

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,158
    • View Profile
    • Donate to Member
Re: IDEA: Synch Folders NOT files
« Reply #2 on: April 23, 2007, 01:50:33 AM »
How does that work? - I'm not very 'au fait' with the command window unless I have step by step instructions!  :-[

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 886
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
Re: IDEA: Synch Folders NOT files
« Reply #3 on: April 23, 2007, 05:09:00 AM »
 :) Press Win-R, enter CMD /K XCOPY <source> <target> /E /T and press Enter (replace the <source> and <target> parameters with something like C:\ or D:\Folders)

Or add the command to a AutoHotkey script:

;FolderCopy.ahk
Run,CMD /K XCOPY <source> <target> /E /T

Skrommel
Please stop by my site at  1 Hour Software by skrommel  for downloads and more info.

alexk7110

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 8
    • View Profile
    • Donate to Member
Re: IDEA: Synch Folders NOT files
« Reply #4 on: May 11, 2007, 05:55:12 PM »
If only I knew this a couple of years ago..
I've had to create a set of batch scripts that one would copy folder names on a text file and then have another one read it  as parameters for a "for every - in - do" mkdir command. argghhhh.. Oh, well now I know, thanks Skrommel for the tip..

PlayPhil

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 24
    • View Profile
    • Donate to Member
Re: IDEA: Synch Folders NOT files
« Reply #5 on: May 12, 2007, 07:54:28 AM »
If you are constantly sync'g a folder, for instance My Documents, you can also setup a shortcut...

%windir%\system32\cmd.exe /K xcopy "C:\My Documents" "H:\My Documents" /E/T

where H is a valid path to another drive in this case, a USB stick for example. Note the quotes are necessary when there are spaces in the pathname. I use quotes all the time whether there's spaces or not.

Similarly, a shortcut to use Skrommel's EjectCD script...

%windir%\system32\cmd.exe /C pushd "C:\Skrommel\CdOpenClose" && EjectCD.exe G

where /C closes the cmd wndo after completion, and G is the CD/DVD drive. I use 'pushd' since the path to the directory is not defined, ie, not in the path variable on my system. Also in the shortcut definition, the cmd wndo is run minimized, I use the icon from EjectCD and the shortcut resides in the Quick Launch menu - very handy, quick too :)

Amazing how many are not familiar with xcopy, yet it's fast, very functional and totally reliable
Phil

patthecat

  • Member
  • Joined in 2006
  • **
  • Posts: 88
    • View Profile
    • Donate to Member
Re: IDEA: Synch Folders NOT files
« Reply #6 on: May 12, 2007, 10:50:08 AM »
The command line command called Robocopy.exe (found in Microsoft Windows Resource Kits) can be used to synchronize subdirectories with the /MIR  (mirror) switch.

The link below basically shows a screen which shows what I'm talking about above with the robocopy output displaying the run statistics:
http://www.simplefai...om/kb.aspx?kbid=1013

If you do not want to deal with the command line, then a Microsoft Software Engineer has also created a  windows GUI for robocopy.  See link below:
http://www.microsoft...11/UtilitySpotlight/

When doing backups of a doctor's Electronic Medical Records data, I first copy the live production data onto a separate drive.  I then make archives/backups off of this copy.  I am currently using an xcopy script but will be migrating to another script using robocopy with the /MIR option since I think it's more robust than xcopy.  On subsequent runs, only files which were added, changed, deleted from both source and destination directories will be processed rather than every file being copied to the destination directory.


patrick