Results for "Category: Files"
Get .exe file header info
The following code sample illustrates how to search from a given directory downward through the entire directory tree. The sample output from this example is directed to the system debug screen. For this example, the first class member (below) is called by a menu item. After the search is finished, a message box pops up. http://www.concentric.net/~cgalbrai/dirsrh.shtml
Copy a file from a LAN to UNIX and vice versa.
This code shows the size of any given file in bytes,K/bytes and M/bytes....
My code Merges two Files together and puts them into a single file.It is a windows proggie but the code will also work under dos or other os's.PLEASE VOTE!
Generic structure disk file manipulations. These functions form a basic template for reading and writing structures to a sequential file. This template is probably most useful for files with 500 or less records and eliminates the need for a more elaborate file handler such as C-Tree, DB-Vista, Mix etc. Routines to put data in the struct is out of scope here. Written by Lynn Nash 8/28/91 and donated to the public domain.
This is a slightly more advanced topic than what I have covered so far, but I think that it is useful, and I think it will be useful to many people. File i/o is basically reading, and writing files. This lesson will only cover text files, that is, files that are readable through a text editor, as opposed to binary files(exes for example). It will not cover a great deal, for example, this lesson will not deal with searching files or reading specific data from files. It will merely be concerned with opening, writing, and reading text files. Don't worry though, lesson 11 will cover much more on this topic.
This program allows you to find a file or a directory in a specified drive (e.g. your hard disk, a floppy, your cd-rom...). It search for it in all the directories you have in that drive. Click Luke to go to my Web Page: other source code available...
MAXIMUM SECURITY (CDynamicEncrypt) Is really a simple class it inherits the CFile class of MFC and override Write, Read & Seek functions so that you can use them normally. but the data that is saved or read is encrypted and decrypted at the run-time, YOU DONT NEED TO ENCRYPT YOUR FILE AFTER YOU FINISHED ALL OF IT. YOU DONT NEED TO DECRYPT IT AT ALL IN ORDER TO READ IT. Thinks about it when saving sound and bitmaps of your product encrypted all the time and you use the normal classes you already use that utilizes the CFile class to read these encrypted files.
This simple application browse your network neighborhood and by double click on any share it browses the files...IF THIS CODE HELPS YOU VOTE FOR ME this only takes seconds from u and it took me much more than that to make this prog for u :) thnx ...
Encodes files with a password you choose and decodes them back if runned again with the same password. If you like this program, I would be glad if you rated it for me to know how many users like this program.
This demonstrates an example of C++'s fstream File I/O. Very simple; the basic stuff for beginners to learn from. If you would like to see how to do something more in the direction this code leads, comment on (and rate) it telling me what specifically you want to see and I'll be glad to suffice.
For circular logging System
a class to make using fstream easier. NOTE: after a call to openfile() it is HIGHLY recomended to call closefile()
InFile searches by a string like "Microsoft Corporation" inside any file you want, case sensitive or not, within subdirectories or not. Example: infile c:\*.txt "Copyright (C)" -sub -case Functions used: FindFirstFile, FindNextFile, fopen, fseek, fread, SetCurrentDirectory, GetCurrentDirectory.
DirWalk demonstrates how to read a directory structure. Its output looks like TREE MS-DOS command (CONSOLE). I used FindFirstFile and FindNextFile Win32 API functions to program it. It does everything in one function, a recursive function. DirWalk only shows directories, not files. You can modify it to show the files too.
FILE HANDLING TUTORIAL FOR BEGINNERS ------------------------------------ This tutorial is intended who don't not a single thing about file handling in C++, one of the most important concepts of any type of programming. I intend to present this tutorial into 2 parts, but both these parts are independent of each other and you can start from any one. This part focuses on: ->How to create files, read and write to them. ->The logic behind many commonly used objects like cout and cin [Did you know that cout is actually an object!!] ->Build your own notepad, "my computer" et cetra. If any doubts persist you can freely sontact me at: [email protected] Click on file handling.htm to start.
This article contains details about reading and writing structured data, the get and getline functions and more. A MUST for someone just entering programming.
It is just a function that reads subdirectories from a root into an array, and calls back user for each new directory found (i hope that you'll understand what i mean !!!!) I "played" with pointers, it could be interesting for beginners :) Oh, don't forget to vote !!!!!
This is the _defs.h header someone requested.