Search - Articles
DevASP.NET for ASP.NET, VB.NET, XML and C# (C-Sharp) Developers Tuesday, March 03, 2009
Dev Articles
Search Directory
SQL Server

Home >Search > Articles & Samples > C-Sharp > File Management
What's New - What's Hot
Listings for File Downloading File Downloading (7)
Listings for File Uploading File Uploading (12)
Listings for Hard Drive Directories Hard Drive Directories (26)

Cabinet File (*.CAB) Compression and Extraction     
Total Hits: 236  |  Today: 0Author: Elmue.      Rating:  
Read Reviews | Write Review |  Your Rating: 

.NET does not offer compression functionality. If you search the internet for libraries which are ready to use, you find, for example, ICSharpCode.SharpZipLib.dll which offers ZIP compression. But this library is awkward to use and buggy, and so is unusable. Although the bugs have been known for years, the author has not fixed them....

FileHelpers v1.6.0 - Automatic File Import/Export Framework     
Total Hits: 287  |  Today: 0Author: Marcos Meli.      Rating:  
Read Reviews | Write Review |  Your Rating: 

The FileHelpers are an easy to use library to import/export data from fixed length or delimited flat files (like the CSV). Also has support to import/export data from different data storages (Excel, Acces, SqlServer)

The library has a set of converters for the basic types and can be easy extended to provide custom converters....

Multi-threaded file download manager     
Total Hits: 1659  |  Today: 0Author: Shailen Sukul      Rating:  
Read Reviews | Write Review |  Your Rating: 

A fully working multi-threaded file downloader application. A few months ago, my lovely wife was downloading her lecture notes from her university website, and I noticed that she had to manually click on every file to save it to the hard disk. I also noticed that all the hyperlinks were on the same page, and the documents she was downloading were either Word documents or PowerPoint presentations....

C# and advanced binary files     
Total Hits: 242  |  Today: 0      Rating:  
Read Reviews | Write Review |  Your Rating: 

Opening binary files is allmost the same, you just use BinaryReder / BinaryWriter to read and write to open File , i.e. stream.However the operations you can perform on this stream is limited by the BinaryReader/Writer range of methods. You can read/write all the generic data types( e.g. int, float, byte, etc.) as well as byte arrays. But what about custom structs!? You can use the Serializable options in .NET bu that works with data types created in .NET. What if you have one binary files with ...

File Synchronization using a NAnt Task     
Total Hits: 238  |  Today: 0Author: S. Ying      Rating:  
Read Reviews | Write Review |  Your Rating: 

Many developers, like myself, with a sufficiently large collection of files to manage, find it at least time consuming to do it manually. There are many tools that one can use, some of them are free, the others require a fee. They fit different needs. I am going to introduce one of them here, which is extracted from the build system that was developed to realize some of our development requirements of being flexible in an evolving (developing!) environment and expandable. Being tight on time and...

Secure FTP Library for .NET Framework     
Total Hits: 368  |  Today: 0      Rating:  
Read Reviews | Write Review |  Your Rating: 

Secure FTP for .NET is a versatile file-transfer component for .NET languages (such as C# or VB.NET). It allows you to transfer files directly from your application using FTPS, an extension of FTP which is fast becoming a standard for secure FTP. FTPS enhances the standard FTP protocol by utilizing the well known and widely used TLS and SSL protocol. TLS 1.0 and its predecessor SSL 3.0 provide strong authentication, integrity and confidentiality on both the control and data channels....

C# RIFF Parser     
Total Hits: 345  |  Today: 0Author: gtamir      Rating:  
Read Reviews | Write Review |  Your Rating: 

Ever wondered how to access the information in an AVI file or wanted to extract information directly from a WAV file? Most people refer external COM objects (like AVIFIL32.DLL) to access the information (see A Simple C# Wrapper for the AviFile Library). The RIFF Parser allows you to access the resource information stored in the files directly by C#.RIFF is the Resource Interchange File Format. This is a general purpose format for exchanging multimedia data types that was defined by Microsoft and...

Converting RTF to TXT format     
Total Hits: 267  |  Today: 0Author: kubben      Rating:  
Read Reviews | Write Review |  Your Rating: 

Often there is a need to convert a file from one format to another. Most of the tools out there seem to cost some money. Not a lot of money, but they aren’t free. Anyway, several file types that you may want to convert to can be done through Microsoft Word. Here is an example of using C# to access Word Automation object to read in a file type and then write out a different file type.
I had a need to convert an RFT format to TXT. As I was looking for solutions, I had a hard time finding one th...

Reading and Writing Binary files in C# .Net     
Total Hits: 191  |  Today: 0Author: azamsharp      Rating:  
Read Reviews | Write Review |  Your Rating: 

For files with known internal structures, the BinaryReader and BinaryWriter classes offer streaming functionality that's oriented towards particular data types. The good thing about writing binary files are you cannot read the files by just opening them in the notepad also binary files can be of very large size. Lets look at the code to create Binary files....

Reading and Writing XML Files     
Total Hits: 163  |  Today: 0Author: azamsharp      Rating:  
Read Reviews | Write Review |  Your Rating: 

Okay lets see how we can write XML files. Writing and Reading Xml files are most important because sometimes they can also be used as a database. Lets see how we can write and read xml files. Typically, you use an XmlTextWriter if you need to write XML as raw data without the overhead of a DOM. The XmlTextWriter is an implementation of the XmlWriter class that provides the API which writes XML to file, stream, or a TextWriter. This class provides numerous validation and checking rules to ensure ...

Watching a File in C#     
Total Hits: 124  |  Today: 0Author: ra00l      Rating:  
Read Reviews | Write Review |  Your Rating: 

This article talks about how to set a watch on a file or directory, and take custom actions when that file is modified. These tasks can be accomplished by using the .NET class FileSystemWatcher. You can watch for changes in files and subdirectories of the specified directory. The component can watch files on a local computer, a network drive, or a remote computer. Let's go a little deeper into the class and find out more about it, by taking a look at its methods and properties. The first thing ...

File Watcher     
Total Hits: 309  |  Today: 0Author: Ravi Kumar raja      Rating:  
Read Reviews | Write Review |  Your Rating: 

The example creates a FileSystemWatcher to watch the directory specified at runtime. The component is set to watch for changes in LastWrite and LastAccess time, the creation, deletion, or renaming of text files in the directory. If a file is changed, created, or deleted, the path to the file prints to the console. When a file is renamed, the old and new paths print to the console....

Working with Archived files     
Total Hits: 88  |  Today: 0Author: Harkos      Rating:  
Read Reviews | Write Review |  Your Rating: 

Some time ago, I was sent to work with an old mainframe system. There I became familiar with a source repository where a single file on the system contains several files from the source code. Although this seems very familiar to many people (through TAR or ZIP files), I wanted the ability to work with the files within without copying them to a temporary location. This article is the result of this quest....

A 'Split and Merge' web service file upload solution for large files     
Total Hits: 267  |  Today: 0Author: CodeProject      Rating:  
Read Reviews | Write Review |  Your Rating: 

If you have ever developed a Windows Forms application that sends files (possibly large) to a web server with a HTTP web service, you will probably already know how poorly the .NET framework handles this task. Web services were designed to send messages, but then people started using them to send arrays of bytes, i.e., from a file. The problem here is that IIS has a request time out, and a maximum request size, which is a problem for large files, even if the developer can control these factors. ...

Total Hits: 270  |  Today: 0Author: CodeProject      Rating:  
Read Reviews | Write Review |  Your Rating: 

We often do repetitive and tedious work like coping , deleting zipping files and directories. How we do that? Well, typically manually and when the number of steps is, say greater than 5 , we write a batch file. Easy? Not entirely. This kind of work requires ultimate attention and concentration. If we misspell the file name, possibly the wrong file or directory may be deleted or renamed etc. What about zipping the files or directories from batch?
The Directory Manager is the program to addres...

Directory functions in C#     
Total Hits: 432  |  Today: 0Author: devcity      Rating:  
Read Reviews | Write Review |  Your Rating: 

Here are some useful file managing functions in .NET
The use the System.IO namespace
All functions also assume the logged in user has the security needed to delete the file or directory, if not they will throw an error of SecurityException...

File Merger and Splitter in C#     
Total Hits: 117  |  Today: 0Author: Say Gin Teh      Rating:  
Read Reviews | Write Review |  Your Rating: 

This program can be used to break up a large file into several files AND merge those files back into one single large file....

Find Files In C#     
Total Hits: 1621  |  Today: 0Author: Bejoy Nair      Rating:  
Read Reviews | Write Review |  Your Rating: 

This helps in searching u'r hard disk for files of the desired extention. I have used System.IO namespace from the .Net framework. So now gone are the days of importing the API's functions in VB or using the fileSystemObject(and adding one more activex component with u'r builds!!!!!) for searching for doing file operations.The System.IO namespace gives us very effective classes for file specific operations.

HOW TO: Recursively Search Directories by Using C# .NET     
Total Hits: 3069  |  Today: 0      Rating:  
Read Reviews | Write Review |  Your Rating: 

This step-by-step article shows through code how to recursively search subdirectories for files, starting with a root directory. A search string is specified so that you can search for files that match a certain criteria. Each part of the code is explained as necessary. A working code sample is also provided at the end of the article. Directory recursion is a common IO task for developers. The FileSystemObject makes this task easy for Component Object Model (COM) applications. Now this task has ...

Simple Web File Download     
Total Hits: 1917  |  Today: 0Author: Bill Farley      Rating:  
Read Reviews | Write Review |  Your Rating: 

This is a simple program that shows how to download files from the web and save them. The program uses the HttpWebRequest and HttpWebResponse classes to request and retrieve the requested file....

Disclaimer - Privacy
© 2002-2017