# computer question - comparing directories

**URL:** <https://boards.straightdope.com/t/computer-question-comparing-directories/291288>\
**Category:** Factual Questions\
**Created:** [February 22, 2005, 3:52am UTC](https://boards.straightdope.com/t/computer-question-comparing-directories/291288 "2005-02-22T03:52:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rainy](https://avatars.discourse-cdn.com/v4/letter/r/c2a13f/32.png) [@rainy](https://boards.straightdope.com/u/rainy)\
**Post date:** [February 22, 2005, 3:52am UTC](https://boards.straightdope.com/t/computer-question-comparing-directories/291288/1 "2005-02-22T03:52:15Z")

</div>

I’m trying on my home office computer to set up a duplicate directory of files from a folder on the network at my office. There is a substantial volume of files and I’m trying to bring it home in 1 Gig chunks on a memory stick.

Is there a way to copy filenames into a Word document, so that I can create one document for work and one for home and have Word ‘compare’ them to see if I missed anything?

Or if there is a way-more-better way to accomplish this task (without me coming out of pocket to do so) I’m open to suggestions. My VPN is not an option, as it is so painfully slow that I’m turning to having this duplicate directory to speed things up.

I appreciate it.

-rainy

---

<div class="post-metadata">

**Author:** ![Shagnasty](https://avatars.discourse-cdn.com/v4/letter/s/9dc877/32.png) [@Shagnasty](https://boards.straightdope.com/u/Shagnasty)\
**Post date:** [February 22, 2005, 4:07am UTC](https://boards.straightdope.com/t/computer-question-comparing-directories/291288/2 "2005-02-22T04:07:35Z")

</div>

By far, the best way to do this is to tell your boss to buy you an external USB hard-drive. They are not that expensive and you may even be able to find a sub 100gb model for less than $100. The cost-benefit on that should be self-evident after you consider transporting back in increments and then developing and analyzing MS Office solutions to figure out what you have done. Don’t be penny-wise and pound foolish. It is also a trivial task to resync the two systems if you do it this way based on whatever criteria you choose.

If you insist on the directory listing approach: [here are some utilities that will give you a file listing that you can paste into Word on each side.](http://www.download.com/3120-20_4-0.html?qt=directory&tg=dl-20&search.x=22&search.y=10&search=+Go%21+)

---

<div class="post-metadata">

**Author:** ![leenmi](https://avatars.discourse-cdn.com/v4/letter/l/f1d935/32.png) [@leenmi](https://boards.straightdope.com/u/leenmi)\
**Post date:** [February 22, 2005, 4:12am UTC](https://boards.straightdope.com/t/computer-question-comparing-directories/291288/3 "2005-02-22T04:12:43Z")

</div>

There are probably tools that will help you do this, but using native DOS commands you can:

Use the **dir** command to list the directory your interested in and capture that output in a text file named orig\_dir.txt  
Once the files are transferred to your home computer, you can use the **dir** command again to list the new directory and capture the output to a file named new\_dir.txt  
Then, you can use the **comp** command to compare the first text file to the second text file and note the differences.

[This page](http://www.computerhope.com/msdos.htm) has instructions for the dir and comp commands.

If you have a portable music player (an mp3 jukebox or such), these can be used to transfer files. For example, I have a 20GB iRiver that I can transfer files to using the usb cable and retrieve wherever I want.

Also, there are directory mirroring tools that will create copies of directory structures and keep them synchronized, but you need a network connection or have them on the same computer. If the vpn is a limiting factor for you, this might not be an option.

Do you really need the whole directory structure? Couldn’t you transport just the files you may need to save space? Also, is it okay with your employer to transfer files from work to home? I know you can use the vpn, but wouldn’t the files stay on your network share at work?

---

<div class="post-metadata">

**Author:** ![sleestak](https://avatars.discourse-cdn.com/v4/letter/s/919ad9/32.png) [@sleestak](https://boards.straightdope.com/u/sleestak)\
**Post date:** [February 22, 2005, 8:43am UTC](https://boards.straightdope.com/t/computer-question-comparing-directories/291288/4 "2005-02-22T08:43:55Z")

</div>

Do this from a command prompt:

c:\whatever\_directory\>dir \>work\_listing  
enter

This creates a txt file called work\_listing with the output from the dir command.

Do the same thing on our home computer but name the file work\_listing\_home. Pu the two files in the same directory and do:

c:\comp work\_listing work\_listing\_home /N=XXXX/L  
where XXXX is equal or greater than the number of lines in the file. If you think the directories have 500 files in it use /N=600

That will compare the files and list the line numbers that differ between the two. Oh, and you can open the work\_listing and work\_listing\_home files in Word or Notepad.

Hope this helps.

Slee

---

<div class="post-metadata">

**Author:** ![rainy](https://avatars.discourse-cdn.com/v4/letter/r/c2a13f/32.png) [@rainy](https://boards.straightdope.com/u/rainy)\
**Post date:** [February 22, 2005, 3:21pm UTC](https://boards.straightdope.com/t/computer-question-comparing-directories/291288/5 "2005-02-22T15:21:09Z")

</div>

You guys are the great! Thanks for the instructions.

leenmi, yeah they are fine with me doing this. I was originally the one that resisted having all the files at home or on a portable device because of security, but I seem to be the only one worried about it, so I’m going to stop making my life hell using the VPN. I’ll just copy any files modified recently on my trips to the office and update them at home so I’m always working with current revisions.

Thanks again guys.

-rainy

---

<div class="post-metadata">

**Author:** ![Dragwyr](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dragwyr/32/2855_2.png) [@Dragwyr](https://boards.straightdope.com/u/Dragwyr)\
**Post date:** [February 22, 2005, 5:25pm UTC](https://boards.straightdope.com/t/computer-question-comparing-directories/291288/6 "2005-02-22T17:25:05Z")

</div>

If you don’t want to have to deal with the DOS command, you can download a small program called rjhExtensions that will give you the ability to save all the files in a directory into a text file.
