The Wayback Machine - https://web.archive.org/web/20090901155604/http://www.codeguru.com:80/cpp/w-p/files/

CodeGuru
Earthweb Search
Login Forums Wireless Jars Gamelan Developer.com
CodeGuru Navigation
RSS Feeds

RSSAll

RSSVC++/C++

RSS.NET/C#

RSSVB

See more EarthWeb Network feeds

follow us on Twitter

Member Sign In
User ID:
Password:
Remember Me:
Forgot Password?
Not a member?
Click here for more information and to register.

jobs.internet.com

internet.commerce
Partners & Affiliates
















Home >> Visual C++ / C++ >> Windows Programming >> File & Folder


File & Folder

Browser Functions & Dialogs



Puzzle, a Game with the MFC Doc/View Architecture (SDI/MDI)
Rating:
Georges Dumond - 06/02/2005
Learn how to display a menu with thumbnails and several other windows, move and manage the pieces of a puzzle with a linked list, and then show them without flicker.

YABFFW'—Yet Another BrowseForFolder Wrapper
Rating: none
Michael Herstine - 08/18/2003
This is a CWnd subclass wrapping the Shell API SHBrowseForFolder in an MFC-friendly way. The approach attempts to integrate more cleanly into MFC apps, making it easier to customize the appearance and behavior of the dialog box.

GetFolder : Shell Extension Folder Browser Function
Rating:
Vishal D. Khapre - 02/13/2001
Function that uses the shell extensions to display a folder browser dialog and retrieve the resulting user-selected folder name


Controls & Dialogs



File and Directory Picker Control
Rating:
Lee Hamel - 03/04/2003
The FilePickCtrl class is very similar to what Explorer uses for views, but with some slight differences including the use of file masks, small and large icon sizes, directory-only display, and more. (The article and source code were updated.)

File Searcher Edit Control with Browse Button
Rating: none
Pete Arends - 09/12/2001
Single control that contains both an edit control to type in a file name and a button to browse


File & Folder



[Updated] Spying a File System
Rating:
Vitali Halershtein - 04/29/2004
How to create the basis for a file system spy application.

Work Around the Bug of "Deprecated DOS Wildcards"
Rating:
Max A. Shonichev - 01/15/2003
Fix the bug of accidentally matching "long" filenames to "short" filenames when using wild cards. For example, the FindFile API wrongly matches "MyApplicationForm.resx" to "*.res" because its shortened name is "MyAppl~1.res".

How to Format a (Floppy) Disk
Rating: none
Remy Böhmer - 11/19/2002
Learn how to format a floppy on all Microsoft Windows versions released since Windows 95. (Uses the SHFormatDrive method of the Shell32.dll.)

GetLongPathName API Function Emulation
Rating: none
Randall Garacci - 11/12/2002
Emulates the functionality of the GetLongPathName API call on Windows 95 and NT (GetLongPathName is only available on Windows 98/ME and Windows 2000/XP).

Recursive Directory Copying
Rating:
Lenworth Henry - 11/06/2002
A new routine using CopyFile and FindFirstFile win32 base API to recursively copy a directory in code.

CFileInfoArray
Rating: none
Antonio Tejada Lacaci - 10/01/2002
Class for gathering file information recursively through directories

Building a Deletion and Access Control Manager
Rating:
Vinoj Kumar - 05/28/2002
Learn how to take control and protect your system from unwanted file deletions.

CreatePath - Full Path Creation (wstring version)
Rating:
Assaf Tzur-El - 01/15/2002
This is a function to deal with creating complete (multi-level) paths.


File I/O



CFileWatch
Rating: none
Herbert Griebel - 06/06/2001
This class helps you to monitor files. You are notified if a file is modified outside the program.

Deleting Locked Files
Rating:
Zoltan Csizmadia - 11/14/2000
Command line utility (with source code) for closing and deleting locked files

CStringFile Class
Rating:
Frank Driesens - 04/02/2000
Efficient means of reading large text files


File Information



Getting Past the 2 Gb File Limit
Rating:
Richard Newcombe - 01/22/2007
Take a closer look at the 2 Gb limit that we are plagued with in different languages, and how to get around them.

Extension Reports in VC++
Rating:
Vinoj Kumar - 06/17/2002
Obtain a report on how much space in the files in a specified folder or drive is being used.

Accessing a File's Version Resource Information
Rating: none
Thomas Weller - 04/16/2002
Finding version information on a file (such as an EXE or DLL).

FileObjectInfo - Digging into the Windows NT Internals
Rating: none
Holger Erne - 02/15/2001
Tool (NT native API source code!!) that lets you take a look at Windows NT's file objects


Folder/Directory Maintenance



[Updated] Find Directory Files Easily and Execute a Function for Each of Them
Rating: none
Aurelien BOUDOUX - 06/23/2006
Learn about a Win32 C++ class for recursive path file scanning.

A C++ Wrapper and Extension of Windows FileSystemObject Objects
Rating: none
Skeeter Xu - 02/28/2006
Learn about a C++ implementation of Windows FileSystemObject objects. It wraps and extends standard FileSystemObject interfaces (methods/properties).

Three Powerful Yet Untapped Features of NTFS
Rating:
Pinky98 - 06/21/2005
The NTFS windows file system has introduced several features that improve the performance, stability, and reliability of file storage. Of these, three features lend themselves to advanced methods of information storage and collation. Few applications have, however, made extensive use of these features. This article introduces these features and identifies some of the potential uses each one exhibits.

Enumerate WFP Files
Rating:
Ajay Vijayvargiya - 02/02/2005
Windows systems launched after Windows2000 include a WFP feature (Windows File Protection). This article glimpses over it and shows how to enumerate the list of all protected files.

Deleting a Directory Along with Sub-Folders
Rating: none
Feroz Zahid - 01/21/2005
Learn about a function that deletes an entire directory structure.

Discover COM: Connection Points Versus Mailslots in Replication Directory
Rating: none
Adrian Bacaianu - 10/11/2002
Solve the old problem of directory replication.

Make Sure Path Exists
Rating:
Arlen Albert - 03/15/2002
Sure, you can use the API version of MakeSureDirectoryPathExists function to satisfy your needs, but here is an alternative way.

Delete Routine
Rating: none
Pramodh.G.N. - 09/19/2001
This piece of code will delete a folder that isn't empty in Windows NT or Windows 2000.

Creating Mulitple Levels of Directories
Rating:
Josh Carlson - 02/16/2001
Function that takes a full path and walks that string creating each folder until all are created

Empty Directory Utility Under NT
Rating: none
Michel Yossef David - 08/04/2000
Useful Win32 API-based function that deletes all folders and files within a specified folder

Create Multiple Level Subdirectories
Rating: none
Brad Guttilla - 04/24/2000
Single function to create multiple levels of folders


INI files



CIni, Ini-file IO with a minimum of codelines
Rating: none
Michael Schikora - 02/14/2003
An easier way to update and use INI files values.

How to Read and Write an INI File
Rating:
Aisha Ikram - 01/09/2003
Read and write to and from an INI file. List sections and section data (key-value pairs) as well as displays a key value and creates and modifies a key-value pair.


Installers



A Simple Installer
Rating: none
Conor McQuaid - 11/13/2002
How to embed arbitrary files as RCDATA within an executable and turn them into filesystem entities during runtime.


Shell API Functions



A File Checksum Shell Menu Extension
Rating:
Jeffrey Walton - 12/27/2006
Learn about two Explorer Shell Extensions: One creates File Checksums; the other verifies File Checksums.

Utility to Create a Link (Shortcut)
Rating:
Dillip Kumar Kara - 05/19/2004
"Shortcut" is a utility to create a link of an existing file on the Start Menu or Start->Program Menu or Desktop.

SHFILEOPSTRUCT and the SHFileOperation
Rating:
John Z. Czopowik VC++ MVP - 05/03/2000
Discusses some of the (poorly documented) issues regarding the use of the SHFileOperation function