Click here to Skip to main content
13,085,292 members (54,454 online)
Click here to Skip to main content
Add your own
alternative version


24 bookmarked
Posted 3 Jun 2004


, 3 Jun 2004
Rate this:
Please Sign up or sign in to vote.
A simple tool for collecting files, written in C#, with shell32 support.

Sample screenshot


Lately, I often need to get all the sources of the project together with all the dependencies etc. So, I looked for a tool to select all the desired files and copy them to a single directory. Since I didn't find one, I wrote one.

Using FileCollector

In the main tree, you can select the files you want. Every selection (positive or negative) affects the entire subtree. So you can, for instance, first select the project dir, then deselect the bin and obj and any other files you don't want to take, and so on.

Once you selected all the directories and files, specify a target path, and start the collecting. Warning: Since I figured that the target path is for this purpose only and, even more, is temporary, the tool deletes the target path every time you start collecting.

And the best thing is: if you select the desired files and save the settings to a .fc file, you can start the collection by choosing the context-menu option 'Start' in the Explorer, without bothering to open the Form. That way, you can get the target up to date really quickly.

About the Code

The interesting part is the main treeview. Icons for this one are extracted like shown in furty's FolderTreeView. The delete and copy business (with the nice Windows dialogs) is done with help from arikp's "C# does shell, Part 2". So thanks to both of them - this simply makes a tool look much more 'Windows' ;).

Information about the selected items is stored in the CollectorSettings class by means of positive and negative information. Nothing fancy. The rest is some event handling and some System.IO - but no need to write another article on that stuff :)


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Software Developer (Senior)
Germany Germany
I did my diploma in Dresden and Sydney where I dealt with algorithms, agents and other cool AI stuff. Now I moved to Frankfurt to work on my PhD dealing with software structures for artificial intelligence systems. If I can, I do things in C# and ASP.NET, but if I have to, my C++, Java and SQL are not that bad.
Long Live .NET.

You may also be interested in...

Comments and Discussions

QuestionHow to collect files with the same name Pin
TechOnline28-Nov-04 13:16
memberTechOnline28-Nov-04 13:16 
AnswerRe: How to collect files with the same name Pin
Anonymous29-Nov-04 0:39
sussAnonymous29-Nov-04 0:39 
GeneralRe: How to collect files with the same name Pin
TechOnline29-Nov-04 1:11
memberTechOnline29-Nov-04 1:11 
GeneralRe: How to collect files with the same name Pin
BenDi29-Nov-04 5:00
memberBenDi29-Nov-04 5:00 
GeneralRe: How to collect files with the same name Pin
TechOnline29-Nov-04 10:38
memberTechOnline29-Nov-04 10:38 
GeneralRename UserName\Log.txt to UserName_Log.txt Pin
Herbert Yu9-Jan-08 10:39
memberHerbert Yu9-Jan-08 10:39 
General... Pin
Rocky Moore6-Jun-04 0:02
memberRocky Moore6-Jun-04 0:02 
GeneralRe: ... Pin
BenDi6-Jun-04 4:15
memberBenDi6-Jun-04 4:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.170813.1 | Last Updated 4 Jun 2004
Article Copyright 2004 by BenDi
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid