ÿþ<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=unicode" /> <meta http-equiv="Content-Language" content="en-us" /> <title>The Windows Win32 file management tutorials, information and working program examples</title> <meta name="keywords" content="files, directory, Windows system, program examples, code samples, operating system, online, browsers, Internet, management, security" /> <meta name="description" content="The Win32 programming on Windows files - information, tutorials and code samples" /> </head> <body topmargin="20" leftmargin="20" rightmargin="20" bottommargin="20"> <table border="0" width="100%"> <tr> <td colspan="2"> <h1 align="center" style="margin-top:0; margin-bottom:0"> <font face="Batang"><span style="font-weight: 400">The Windows Win32 File Management Programming</span></font></h1> </td> </tr> <tr> <td colspan="2"> <p align="center"> <script type="text/javascript"><!-- google_ad_client = "pub-8089415323104206"; google_ad_slot = "2156170134"; google_ad_width = 728; google_ad_height = 15; //--> </script> &nbsp;<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script></p> </td> </tr> <tr> <td width="7%" align="center"> <h3> <font face="Byington"><span style="font-weight: 400"> <a title="The Win32 programming tutorial using Visual Studio, C and C++ languages" target="_top" href="index.html"> HOME</a></span></font></h3> <p>&nbsp;</p> <p>&nbsp;</p> <p> <script type="text/javascript"><!-- google_ad_client = "pub-8089415323104206"; google_ad_slot = "3614899554"; google_ad_width = 160; google_ad_height = 600; //--> </script> &nbsp;<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script></p> <p align="left">&nbsp;</p> <p align="left">&nbsp;</p> <div align="center"> <script src="http://tag.contextweb.com/TagPublish/getjs.aspx?action=VIEWAD&cwrun=200&cwadformat=160X600&cwpid=527221&cwwidth=160&cwheight=600&cwpnet=1&cwtagid=82739"></script> </div> <p align="left"></p> <p align="left">&nbsp;</p> </td> <td width="92%"> <h1 style="margin-bottom:0mm;margin-bottom:0; margin-top:0"> <font size="5" face="Times New Roman"> <span style="line-height:115%; font-family:&quot;Arial&quot;; font-weight:400">What do we have in this session?</span></font></h1> <p style="margin-bottom:0mm;margin-bottom:0; margin-top:0"> &nbsp;</p> <p style="margin-bottom:0mm;margin-bottom:0; margin-top:0"> <font face="Arial">This tutorial demonstrates the Windows files and streams manipulations. Information and program examples include compressed and encrypted files.</font></p> <ol> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400"><a href="windowsfileapis4.html">Brief Intro</a></span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">File Attributes</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">Files and Clusters</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400"><a href="windowsfileapis4_1.html">Creating, Deleting, and Maintaining Files</a>: File Names, Paths, and Namespaces</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">Basic Naming Conventions</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">Path Names and Namespaces</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400"><a href="windowsfileapis4_2.html">Maximum Path Length</a></span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">Relative Paths</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">Short and Long File Names and Paths</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400"><a href="windowsfileapis4_3.html">Creating and Opening Files</a></span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">CreateFile() Scenarios</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400"><a href="windowsfileapis4_4.html">File Attributes and Directories</a></span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">Moving and Replacing Files</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">Closing and Deleting Files</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">Defragmenting Files</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">Minimizing interactions between defragmentation and shadow copies</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">Limitations under Windows 2000</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">Retrieving File Type Information</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">Determining the Size of a File</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">Searching for One or More Files</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">Setting and Getting the Timestamp of a File</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400"><a href="windowsfileapis4_5.html">File Type, Size and Timestamp Program Example</a></span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400"><a href="windowsfileapis4_6.html">Determining the Current Character Set Code Page</a></span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">AreFileApisANSI() Program Example</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">Reading From and Writing to Files</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">Positioning a File Pointer</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">Reading From or Writing To Files Using a Scatter-Gather Scheme</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">Flushing System-Buffered I/O Data to Disk</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">Truncating or Extending Files</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">File and Directory Linking</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">File Compression and Decompression</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">The NTFS File System File Compression</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">Compression Attribute</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">Compression State</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">Obtaining the Size of a Compressed File</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400"><a href="windowsfileapis4_7.html">Compressed File (Attributes) Program Example</a></span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400"><a href="windowsfileapis4_8.html">File Compression and Decompression Libraries</a></span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">Decompressing a Single File</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">Decompressing Multiple Files</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">Reading from Compressed Files</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">Using Windows Compressed Functions Program Example</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400"><a href="windowsfileapis4_9.html">Cabinets</a></span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">File Encryption</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">Handling Encrypted Files and Directories</span></font></h3> </li> </ol> <p style="margin-top: 0; margin-bottom: 0">&nbsp;</p> <p style="margin-top: 0; margin-bottom: 0">&nbsp;</p> <div align="center"> <script src="http://tag.contextweb.com/TagPublish/getjs.aspx?action=VIEWAD&cwrun=200&cwadformat=728X90&cwpid=527221&cwwidth=728&cwheight=90&cwpnet=1&cwtagid=82740"></script> </div> <p style="margin-top: 0; margin-bottom: 0"></p> <p style="margin-top: 0; margin-bottom: 0">&nbsp;</p> <ol start="45"> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">Encrypted Files and User Keys</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">Backup and Restore of Encrypted Files</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400"><a href="windowsfileapis4_10.html">Adding Users to an Encrypted File Program Example</a></span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400"><a href="windowsfileapis4_11.html">The self-signed Certificate</a></span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"> <span style="font-weight: 400"><font face="Byington"> <a href="windowsfileapis4_12.html">File Security and Access Rights</a></font></span></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"> <a href="windowsfileapis4_13.html"><span style="font-weight: 400"> <font face="Byington">Input and Output (I/O)</font></span></a></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">I/O Concepts</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">File Buffering</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">Alignment and File Access Requirements</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">File Caching</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">Synchronous and Asynchronous I/O</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"> <span style="font-weight: 400"><font face="Byington">Synchronous and Asynchronous I/O Considerations</font></span></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400"><a href="windowsfileapis4_14.html">Canceling Pending I/O Operations</a></span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">Cancellation Considerations</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">Operations That Cannot Be Canceled</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">Canceling Asynchronous I/O</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400"><a href="windowsfileapis4_15.html">Canceling Synchronous I/O</a></span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">Alertable I/O</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400"><a href="windowsfileapis4_16.html">I/O Completion Ports</a></span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">How I/O Completion Ports Work</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">Threads and Concurrency</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">Supported I/O Functions</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington">Network I/O Concepts</font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">Description of a Network I/O Operation</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400"><a href="windowsfileapis4_17.html">Microsoft SMB Protocol and CIFS Protocol Overview</a></span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">Opportunistic Locks</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">Sparse Files</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">Sparse File Operations</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">Obtaining the Size of a Sparse File</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">Sparse Files and Disk Quotas</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">Symbolic Links</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">Symbolic Link Effects on File Systems Functions</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">Programming Considerations</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">Creating Symbolic Links</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">Example of an Absolute Symbolic Link</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400">Example of a Relative Symbolic Links</span></font></h3> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400"><a href="windowsfileapis4_18.html">More File Management Program Examples</a></span></font></h3> <ol type="a"> <li> <h3 style="margin-top:0; margin-bottom:0"><font face="Byington"> <span style="font-weight: 400">Appending One File to Another File Program Example</span></font></h3> </li> <li> <h3 style="margin-top:0; margin-bottom:0"><font face="Byington"> <span style="font-weight: 400"> <a href="windowsfileapis4_19.html">Creating and Using a Temporary File Program Example</a></span></font></h3> </li> <li> <h3 style="margin-top:0; margin-bottom:0"><font face="Byington"> <span style="font-weight: 400"> <a href="windowsfileapis4_20.html">Locking and Unlocking Byte Ranges in Files Program Example</a></span></font></h3> </li> <li> <h3 style="margin-top:0; margin-bottom:0"><font face="Byington"> <span style="font-weight: 400"> <a href="windowsfileapis4_21.html">Opening a File for Reading or Writing</a></span></font></h3> </li> <li> <h3 style="margin-top:0; margin-bottom:0"><font face="Byington"> <span style="font-weight: 400">Open a File for Writing Program Example</span></font></h3> </li> <li> <h3 style="margin-top:0; margin-bottom:0"><font face="Byington"> <span style="font-weight: 400"> <a href="windowsfileapis4_22.html">Open a File for Reading Program Example</a></span></font></h3> </li> <li> <h3 style="margin-top:0; margin-bottom:0"><font face="Byington"> <span style="font-weight: 400"> <a href="windowsfileapis4_23.html">Retrieving and Changing File Attributes</a></span></font></h3> </li> <li> <h3 style="margin-top:0; margin-bottom:0"><font face="Byington"> <span style="font-weight: 400"> <a href="windowsfileapis4_24.html">Testing for the End of a File (EOF)</a></span></font></h3> </li> <li> <h3 style="margin-top:0; margin-bottom:0"><font face="Byington"> <span style="font-weight: 400"> <a href="windowsfileapis4_25.html">Using Streams Program Example</a></span></font></h3> </li> <li> <h3 style="margin-top:0; margin-bottom:0"><font face="Byington"> <span style="font-weight: 400">Alternate File Stream</span></font></h3> </li> </ol> </li> <li> <h3 style="margin-top: 0; margin-bottom: 0"><font face="Byington"> <span style="font-weight: 400"><a href="windowsfileapis4_26.html">File Management Reference</a></span></font></h3> <ol type="a"> <li> <h3 style="margin-top:0; margin-bottom:0"><font face="Byington"> <span style="font-weight: 400">File Management Control Codes</span></font></h3> </li> <li> <h3 style="margin-top:0; margin-bottom:0"><font face="Byington"> <span style="font-weight: 400">File Management Enumerations</span></font></h3> </li> <li> <h3 style="margin-top:0; margin-bottom:0"><font face="Byington"> <span style="font-weight: 400"> <a href="windowsfileapis4_27.html">File Management Functions</a></span></font></h3> </li> <li> <h3 style="margin-top:0; margin-bottom:0"><font face="Byington"> <span style="font-weight: 400">File Management Structures</span></font></h3> </li> </ol> </li> </ol> </td> </tr> <tr> <td colspan="2"> <p align="center"> <script type="text/javascript"><!-- google_ad_client = "pub-8089415323104206"; google_ad_slot = "0761177910"; google_ad_width = 728; google_ad_height = 90; //--> </script> &nbsp;<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script></p> </td> </tr> <tr> <td colspan="2"> <h3 align="center" style="margin-top: 0; margin-bottom: 0"> <font face="Byington"><span style="font-weight: 400">&lt; <a title="The Windows Win32 directory programming for Windows system" style="color: blue; text-decoration: underline" href="windowsdirectoryapis3index.html"> Windows Directory Index</a> | <a title="The Win32 programming tutorial using Visual Studio, C and C++ languages" style="color: blue; text-decoration: underline" href="index.html"> Win32 Programming</a> | <a title="The Windows file attributes and clusters" style="color: blue; text-decoration: underline" href="windowsfileapis4.html"> Windows Files 1</a> &gt;</span></font></h3> </td> </tr> </table> </body> </html>