Results for "Category: Files"
Save entire classes or structs at a time to an xml file, and then read them back.
This code (the first of its kind in the VB.NET section of PSC) will allow you to quickly and easily send a file over dialup, LAN or BroadBand. Works fine, and all the programs that i tested it on (from 20k to 200Meg worked fine after the transfer!) If you have a brief knowlage of file manipulation, this should be pretty simple to understand.
This code simply writes to a file on the disk, or reads the contents of an existing file on the disk into a text box.
This piece of Code watch for the changes in the specified folder. Changes may be of any kind like renaming file/folder, deleting, editing etc. Actually implemented a class of FileSystemWatcher.
Create Excel Spreadsheet without Excel automation. A port from vb6(enclosed) by Paul Squires at http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=11898&lngWId=1
This may seem simple but I didn't find anything like this anywhere and I thought I should add it so it will help others. This artitle is to show you how to send a string variable as a downloadable file in asp.net.
Using the CopyFileEx Win32 API in C#. Try my CopyEx library and please give feedback. Choose a file as a source and copy it to another place. You will have the current transfert rate in Ko/s and percentage of the file done. Very easy to use. You could implement Cancel, Stop and Continue or Thread priority options...
Ever wanted to use .config files but hesitated because you were not able to write to them? This class allows you to easily write and read from .config Files. The class works (thanks to reflection) both in debug and release mode without any changes. Because the default .config Provider will not reload any configuration without reloading the application this feature is also implemented via a filesystemwatcher that looks for changes on the app.config file. The original implementation can be found on www.angrycoder.com developed by Joel Martinez in C#. Visit www.visualsoft-net.de to download this code and much more vb.net, vb6 and c# samples
This sample code show beginner how to use OpenFileDialog and SaveFileDialog with TextBox.
Just to show how to read a txt or .dat file in vb.net
The Tutorial aims at acquainting beginners, of each and every file and directory operations. I have given my main emphasis to reduce complexity and length of code. I am sure you will find it useful. "Please Vote". ;-) Kart
The Tutorial set sights on Accustoming VB Net Developers with sophisticated File Functions. However main weight is rest on Reducing Code complexity. I strongly believe Code that is easy to Understand works better. I am sure you will find it useful. Please Vote and Make my day ;-) Karthik
To save an Embedded Resource and save to file. This will take any embedded resource and save it to any filename you want.
Associating file types(file extension) to Your Application in .NET.This concept had been tedious or complex process in the past for programmers. But with .NET this has been made easy and flexible.You can associate a new file type (extension) or an existing file (like gif,jpg,bmp etc) to your application easily. you can refer http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsintro7/html/vbtskaddingdeletingdocumenttypesassociatedfileextensions.asp for understanding.I have submitted an example of how to do this. This is photo viewer .If you install this project,you can open the existing GIF files with this program in your system.You can also associate JPG,BMP and other types also.
UPDATED 03/JAN/2010: This is a file upload class with a demo page. Very easy to integrate into existing projects, it only requires three steps. The code is nicely commented and formatted. I've also added JavaScript code that disables the Submit button and shows an image and message informing about the upload. If you use Norton AntiVirus you will need to disable your Script Blocking for the file writting to work. The code can support uploads of up to 2GB or so, but I've only tested it with files of up to 30MB. It also supports the configuration of allowed extensions for more security. If you like this code, please vote. Last Update: Added code that takes care of a IIS vulnerability involving semicolons in file names (extremely important!).
Replace ugly browse button with any image in form element inpu type="file". This is good in form which purpose is uploading pictures.
Use it to recurse (walk-through) every sub-directory of any given path. Use it to find a file or list all files in any given path.
How to use Application Configuration Files.
Accessing IniFiles without the use of the Win32 API's
This example shows a way to use the System.IO.FileSystemWatcher object.