Compare Contents of Folder to Another and Make them the Same
- For all files/subfolders in Folder A that are not in Folder B, copy them to Folder B
- For all files/subfolders in Folder B that are not in Folder A, delete them from Folder B
What I'm trying to do here is make it easier to copy my music from my computer to my phone's SD card. I am constantly adding and deleting music from my computer, and I want to be able to run a script that will just make the music on the SD card exactly the same as the music on my computer.
It takes a long time to copy the amount of music I have over, so I can't just delete all the music from the SD card and copy the whole music folder from my computer. Hence why I need a script which will actually compare the contents and only delete the files which I've deleted from my computer, and add the files I've added.
Does anyone have any ideas on how I would do something like this? Alternatively, does anyone know a way to do something like this without AutoHotKey?
Sign up for free! http://db.tt/9Hrieqj
My Website • Recommended: AutoHotkey Unicode 32-bit • Join DropBox, Copy
Sign up for free! http://db.tt/9Hrieqj
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Antonio França -- git.io -- github.com -- ahk4.net -- sites.google.com -- ahkscript.org
Member of the AHK community since 08/Apr/2009. Moderator since mid-2012.
Another alternative is the freeware Allway Sync. It has simple UI yet powerful. It also has portable version.
RoboCopy is shipped with Windows 7, Windows 8, Windows Server 2008, Windows Server 2008 R2 and Windows Server 2012.
All questions & answers are related to AHK 1.1.19.03 x64 Unicode