---
title: "Copy in Place, Compare, Sync Folders"
url: "https://courses.osherove.com/courses/commanding-total-commander/copy-in-place-compare-sync-folders.md"
canonical: "https://courses.osherove.com/courses/commanding-total-commander/copy-in-place-compare-sync-folders/"
tags: []
author: "Roy Osherove"
description: "Lesson 12 of 15 in Commanding Total Commander (File Ninja: Searching, Filtering and Selecting Files), 3:36. Free video by Roy Osherove."
usage: "Licensed under CC BY 4.0 — reuse, quote and adapt with attribution (Roy Osherove, link to the original page)."
license: "https://creativecommons.org/licenses/by/4.0/"
---

# Copy in Place, Compare, Sync Folders

1. [Courses](https://courses.osherove.com/#courses)
2. [Commanding Total Commander](https://courses.osherove.com/courses/commanding-total-commander/)
3. File Ninja: Searching, Filtering and Selecting Files

Lesson 12 of 15

Duration: 3:36 [Watch on YouTube](https://www.youtube.com/watch?v=yqn06jp7pd8)

## In this lesson

Roy copies a file in the same folder under a new name with Shift-F5, edits it and compares the two files by content, with options to ignore white space and case. He then compares a testing and a production directory with Mark, Compare directories, and synchronizes them with Commands, Synchronize directories, which shows what is different, duplicate or single on each side and what will be copied where. Shift-F4 creates a new text file and starts editing it.

## Transcript

562 words

[\[00:02\]](https://www.youtube.com/watch?v=yqn06jp7pd8&t=2s) Okay, let's talk more about files. And this time we're going to try to So, I'm going to try to show some nice shortcuts when working with files. For example, copy in place. So, I let's say I want to create a copy of contact here, but in the same folder. So, I'm going to press shift F5 instead of just F5 to copy to the other side. I'm going to press shift F5. Which will allow me to change the loc to change the name of it and create a new copy. I'm going to call it contact 2. And now I'm going to press F4 to change it with something.

[\[00:37\]](https://www.youtube.com/watch?v=yqn06jp7pd8&t=37s) Let's say XPCX. I'm going to save that. And what we're going to see is that we can actually compare two files. How do we compare two files? Going to select one file here and the other file here. Or we can select two files in the same location. Contact and contact two and go to files compare by content.

[\[01:10\]](https://www.youtube.com/watch?v=yqn06jp7pd8&t=70s) And we can see the difference between those two immediately. So if you're looking for a comp comparison tool, you can ignore white spaces in case sensitivity etc. Total Commander also has rudimentary support for comparing directories. So let's say I want to compare testing directory on the left here. I'm going to enter it and then the production directory on the right. I'm going to enter that too. And then I'll go to mark compare directories. And what's going to happen is that it's going to show the files that are different from each of the folders.

[\[01:44\]](https://www.youtube.com/watch?v=yqn06jp7pd8&t=104s) And this is helpful just to see now we can try to compare these two things. But if we truly want to do synchronization between directories, there's a command for that. We can just be in these two different directories, say testing on one side, production on the other. We can go to commands, synchronize directories, and that will give us this comparison tool, which also tells us which also allows us to select what will go where. So we can show what's different, what's duplicate, what's single on each side.

[\[02:18\]](https://www.youtube.com/watch?v=yqn06jp7pd8&t=138s) It will tell us what's going to happen when you actually do the synchronization so that both directories will be the same. So if I click synchronize here, this file is going to be copied to the right. This file is going to be copied to the left. Let's do that. Are you sure you want to do that? Yes. You sure you want to override that file? Yes. And sometimes you might need to do more checking before you do the synchronization. But you can also say ignore date, ignore content or compare only by date only by content etc.

[\[02:51\]](https://www.youtube.com/watch?v=yqn06jp7pd8&t=171s) So it's a very powerful tool. One last trick I want to show you is how to create a file a text file right where you are. So if let's say I want to create a new text file in this folder, I'm going to press shift F4. Remember F4 is to edit something. Shift F4 is to create and start editing something. So, shift F4. Let's give it a name. In this case, it might be something.txt.

[\[03:23\]](https://www.youtube.com/watch?v=yqn06jp7pd8&t=203s) And I have this file. I'm going to close, save it, and immediately I see this file right here. Nice and simple.

[Previous lesson Space Calculator and Copy Queues](https://courses.osherove.com/courses/commanding-total-commander/space-calculator-and-copy-queues/) [Next lesson Working with FTP](https://courses.osherove.com/courses/commanding-total-commander/working-with-ftp/)


---

## About the author

**Roy Osherove**: Senior Solutions Architect at AWS working on AI for production and AI-driven development; author of The Art of Unit Testing and Elastic Leadership, with about 20 years of consulting and training on unit testing, TDD, team leadership and continuous delivery.

### Sites

- [RobotPaper](https://robotpaper.ai/): This blog: AI patterns and anti-patterns, AI and coding agents, and engineering leadership.
- [osherove.com](https://osherove.com): Roy's personal site. Author of The Art of Unit Testing and Elastic Leadership; consulting and training on unit testing, TDD, team leadership and continuous delivery, plus about 20 years of blog posts.
- [The Art of Unit Testing](https://www.artofunittesting.com): The Art of Unit Testing, 3rd Edition (Manning): readable, maintainable, trustworthy unit tests, plus TDD workshops in C#, JavaScript, Java and Kotlin.
- [5whys.com](https://www.5whys.com): Roy's writing on software team leadership: self-organizing teams, surviving chaos, learning mode and the Elastic Leadership model.
- [Pipeline Driven](https://pipelinedriven.org): Continuous delivery and DevOps practices: build patterns, pipeline-friendly testing, DevOps metrics and enterprise DevOps.
- [Elastic Leadership](https://www.elasticleadership.com): Elastic Leadership, Roy's framework for software team leaders (survival, learning and self-organizing modes).

### Social

- X: https://x.com/royosherove
- LinkedIn: https://www.linkedin.com/in/osherove/

### Contact

- Contact form: https://forms.gle/jQSx5KoXvrVA1JCK7

### License

Licensed under CC BY 4.0 — reuse, quote and adapt with attribution (Roy Osherove, link to the original page). License: https://creativecommons.org/licenses/by/4.0/
