File System code snippets (41)

How to get file drop list from clipboard

Published: 26. September 2014 | Updated: 26. September 2014
Categories: Windows
Tags: C# File System Windows Winforms WPF

How to enumerate all directories in computer

Published: 12. February 2012 | Updated: 12. February 2012
Categories: Directories Windows
Tags: C# File System Win32 Windows WMI

How to combine absolute and relative path/url

Published: 30. January 2012 | Updated: 30. January 2012
Categories: File system Network
Tags: C# File System Network

How to create empty file

Published: 1. December 2011 | Updated: 1. December 2011
Categories: Files
Tags: C# File System

How to get assembly location

Published: 30. November 2011 | Updated: 30. November 2011
Categories: Reflection
Tags: C# File System Reflection

How to delete readonly file

Published: 30. November 2011 | Updated: 30. November 2011
Categories: Files
Tags: C# File System Windows

How to create path from strings parts

Published: 25. October 2011 | Updated: 25. November 2011
Categories: File system
Tags: C# File System Text

How to calculate file checksum

Published: 4. November 2011 | Updated: 4. November 2011
Categories: Files Security
Tags: C# File System Security Windows

How to append to a text file

Published: 3. November 2011 | Updated: 3. November 2011
Categories: Files
Tags: C# File System Text

How to lock a file

Published: 9. October 2011 | Updated: 31. October 2011
Categories: Windows
Tags: C# File System Windows

How to get disk free space

Published: 12. January 2009 | Updated: 26. October 2011
Categories: File system Hardware
Tags: C# File System Hardware Windows

How to create text file

Published: 22. December 2008 | Updated: 26. October 2011
Categories: Files Streams
Tags: C# File System

How to decompress file using C#

Published: 18. December 2008 | Updated: 26. October 2011
Categories: Files Streams
Tags: C# File System

How to compress file using C#

Published: 18. December 2008 | Updated: 26. October 2011
Categories: Files Streams
Tags: C# File System

How to get DateTime from Windows file time

Published: 24. October 2011 | Updated: 26. October 2011
Categories: DateTime
Tags: C# Conversion DateTime File System Serialization Windows

How to convert DateTime to Windows file time

Published: 24. October 2011 | Updated: 26. October 2011
Categories: DateTime
Tags: C# Conversion DateTime File System Serialization Windows

How to set file to ReadOnly state

Published: 9. October 2011 | Updated: 25. October 2011
Categories: File system Windows
Tags: C# File System Windows

How to change file extension

Published: 25. October 2011 | Updated: 25. October 2011
Categories: Files
Tags: C# File System Text

How to get directory of a file

Published: 9. October 2011 | Updated: 9. October 2011
Categories: Directories
Tags: C# File System

How to truncate file path

Published: 27. January 2009 | Updated: 26. September 2011
Categories: File system Win32
Tags: C# File System Win32 Windows

How to get file name from path

Published: 22. January 2009 | Updated: 22. January 2009
Categories: Files
Tags: C# File System Windows

How to get system directory

Published: 12. January 2009 | Updated: 12. January 2009
Categories: Windows
Tags: C# File System Windows

How to get path to windows special folders

Published: 8. January 2009 | Updated: 8. January 2009
Categories: Windows
Tags: C# File System Windows

How to get file size

Published: 8. January 2009 | Updated: 8. January 2009
Categories: Files
Tags: C# File System Windows

How to copy directory

Published: 8. January 2009 | Updated: 8. January 2009
Categories: Directories
Tags: C# File System Windows

How to create temporary file

Published: 5. January 2009 | Updated: 5. January 2009
Categories: Files
Tags: C# File System Windows

How to write bytes to file

Published: 22. December 2008 | Updated: 22. December 2008
Categories: Files
Tags: C# File System Windows

How to move file

Published: 21. December 2008 | Updated: 21. December 2008
Categories: Files
Tags: C# File System Windows

How to copy file

Published: 21. December 2008 | Updated: 21. December 2008
Categories: Files
Tags: C# File System Windows

How to delete files or folder to Recycle Bin

Published: 14. December 2008 | Updated: 21. December 2008
Categories: Windows File system
Tags: C# File System Windows

How to delete file

Published: 21. December 2008 | Updated: 21. December 2008
Categories: Files
Tags: C# File System Windows

How to encrypt / decrypt file for current Windows user

Published: 16. December 2008 | Updated: 16. December 2008
Categories: Encryption Files
Tags: C# File System Security Windows

How to read file as bytes

Published: 16. December 2008 | Updated: 16. December 2008
Categories: Files
Tags: C# File System Windows

How to get file extension

Published: 15. December 2008 | Updated: 15. December 2008
Categories: Files
Tags: C# File System Text Windows

How to read text from file

Published: 15. December 2008 | Updated: 15. December 2008
Categories: Files
Tags: C# File System Text

How to create file open dialog

Published: 14. December 2008 | Updated: 14. December 2008
Categories: Winforms
Tags: C# File System UI Winforms

How to create file save dialog

Published: 14. December 2008 | Updated: 14. December 2008
Categories: Winforms
Tags: C# File System UI Winforms

How to create directory

Published: 13. December 2008 | Updated: 13. December 2008
Categories: Directories
Tags: C# File System

How to delete directory

Published: 13. December 2008 | Updated: 13. December 2008
Categories: Directories
Tags: C# File System

How to move directory

Published: 13. December 2008 | Updated: 13. December 2008
Categories: Directories
Tags: C# File System

How to get drives

Published: 13. December 2008 | Updated: 13. December 2008
Categories: File system Hardware
Tags: C# File System Hardware Windows