Click here to Skip to main content
15,900,973 members
Everything / File system

File system

file-system

Great Reads

by Marijan Nikic
A utility for automatization of moving files from partition A to partition B and vice versa
by Sergeant Kolja
This is an alternative for "Memory leak detection for WinCE".
by dviljoen
You might be interested in SlickRun http://www.bayden.com/It is a general purpose launcher for opening folders or web sites, starting apps, etc. The user creates "magic words" and associates them with folders, urls, launching apps, opening documents, etc.
by TomQuinn
A simple function used to determine if a file path refers to a network drive and if it does convert it to use the UNC path

Latest Articles

by Brian C Hart
This is a guide, written at an intermediate level, to performing high-speed search and replace operations across thousands of files in C# using advanced techniques such as memory-mapped files, asynchronous processing, and user-friendly interfaces with modal progress dialogs.
by ToughDev
How to integrate FatFs FAT filesystem module with CH375/CH376 USB controller
by Marijan Nikic
A utility for automatization of moving files from partition A to partition B and vice versa
by FrostedSyntax
How to create batch files that make navigating the filesystem in the command prompt a breeze.

All Articles

Sort by Title

File system 

23 May 2012 by Sergeant Kolja
This is an alternative for "Memory leak detection for WinCE".
3 Apr 2012 by bafled in baltimore
Whoa, I do apologize, I thought that this had been deleted. This was my first post before I spent the morning researching on this website and learning protocol. I also have some remote server issues and what was posted is not exactly what I wrote.That being said, I am perhaps a novice and...
19 Dec 2010 by Ian Shlasko
Unless I'm misreading your code on CodePlex, it looks like your utility loads in the entire file every time it changes. That might be fine for tiny files, but it would be a huge performance hit for larger ones (a few megs, for example).Why not do it a bit more simply?using (FileStream str...
2 Jul 2015 by Paw Møller
Implementing a simple file system as a file.
24 Jul 2011 by KhanImranKhan
Hello MembersHow to search files in a password procteced folder on a remote machine ? I've the server IP and userid/password to access the folder but how to authenticate programmatically.Thanks
24 Jul 2011 by Prerak Patel
You need to use NetworkCredential[^].
25 Jul 2011 by Dave Kreskowiak
That depends on the server you're talking about and how you have to access it. You kind of left those little, but very important details, out of your question.
15 Aug 2011 by Areff
Hi every body.I have about 100,000,000 images (each one's size less than 10K , averagely 6K) means about 570GB and at the moment i had stored all of them in SQL Server 2008 R2 in one table.my question is that which way has better speed in accessing them ?1. Images stay in sql server...
16 Aug 2011 by Wendelius
I've done some comparison in binary data performance in Sql Server. Perhaps it would be of some use: How to store and fetch binary data into a file stream column[^]
22 Aug 2013 by hk.v
Is it possible to access the raw data (like traversing sector by sector) of hard disk using java ? If not, please tell the reason.....thnx in advance
22 Aug 2013 by Richard MacCutchan
See https://www.google.com/search?q=java+raw+disk+io[^].
19 Aug 2012 by RAssk2k
hey I want to know if can read or open a file a any steam without writing a file to the disc. This is what i have done so far. byte[] MyData = new byte[0]; //*this is my byte array. i wll get my bytes from my database,name,ect*// MemoryStream stream = new MemoryStream(MyData); //now i...
19 Aug 2012 by Christian Graus
You can't. It's in a stream, you can't do anything with it, apart from write it somewhere, or store it for your use. Windows can't open a program that is not on the hard drive, when it's in that pure binary form. You're just writing code at random, trying to do something impossible.
19 Aug 2012 by Dave Kreskowiak
You can not create a new process from a stream. It can only be launched from a file on disk.
19 Aug 2012 by WebMaster
When your file type is Image, it is possible. Like below codes:string fileName = "D:\\image.png";byte[] buffer = File.ReadAllByte(fileName);Stram stream = new MemoryStream(buffer);this.PictureBox.Image = Image.FromStream(stream);
19 Aug 2012 by Kuthuparakkal
What are you trying to do ? FileStream is nothing but exposing a stream around the file. Also if you have a filestream you use it for 1. Byte level operations like encryption decryption.2. Compress it using standard or custom deflator(zip, rar).3. If you know the file format, then you...
27 Sep 2010 by Flatstrap
Hi all,I'm chasing some help with opening files in my program. To open a data file I would normally use OpenFileDialog() and FileStream() which works great but...I am trying to load some metastock data files but they are indexed by a file called master.dat. Master.dat is in an old format...
27 Sep 2010 by Henry Minute
I do not think that you can get the OpenFileDialog to do that.What you can do is create your own dialog, mimic the appearance of OFD if you want, probably containing a ListBox or ListView that would display the contents of Master.dat.Then handle the doubleclick event to load the F*.dat...
7 Feb 2012 by MR. AngelMendez
hello, I have an idea for a project and I would like to know a few things before I start. My operating system is windows 7 and my project's language is going to be in C#.One, are viruses able to manipulate, damage or interact with files if they have a custom extension? for example lets say...
7 Feb 2012 by Jonathan [Darka]
A virus can infect any file which can be executed, the file extension is not important.Each executable file can be identified no matter what extension you give it, if your proposing a whole new executable format then that would be a whole lot of work....Additionally, changing the...
7 Feb 2012 by Manfred Rudolf Bihy
I'm afraid that is not going to happen. A file can be opened and analzed by a virus to discover it's true purpose. Most files contain some headers that betray to the virus what they really are. For example by renaming a dll or an exe file to a file with a txt extension it could still be found...
10 Aug 2016 by Ashley Rats
have started to learn python few days ago. And today I found this tutorial to make a file manager. How to make a Simple Python File Manager - CodeGeek.io But when i ran it, I found it was little complex and very less time consuming. So anyone can suggest to make a better version of it?I wanna...
10 Aug 2016 by Patrice T
Quote:Can I modify and improve this file manager program?Yes, you can !But from your comments, I fear you need to learn real programming and analyze.A good starting point is to learn an analyze method:- Dijkstra Top-Down method is a good...
18 May 2011 by Erik Rude
Ultimate goal:My ultimate goal is to organise a humongous mess of files in an application. A bit like in photography there are Standard properties (TAGs?) that all files could have (e.g. Camera, Aperture, Date, etc.) and also categories (tags) that users fancy (e.g. Brother, Sunset, Nature)....
17 May 2011 by Pete O'Hanlon
It really depends on what you are planning to do with the files. The Office tags are stored in special properties in the file, and these are displayed out using a shell extension. This allows you to transfer the files between users because the properties are actually part of the files.If you...
20 May 2011 by Sergey Alexandrovich Kryukov
Bad idea!No, there are no a standard tagging method. I think, this is because creators of the system would also think it would be a bad idea.If you explain your ultimate goals (not contaminated with your own architectural ideas you're preoccupied with) you might have a chance to get and...
13 May 2020 by XTAL256
I have a large number (~1800) of small (~2-6Kb) files that i wish to concatenate into one large file.I tried using a PowerShell script using Get-Content and Add-Content, but that was agonisingly slow. Does anyone know of a relatively fast way of doing this using either a PowerShell script,...
22 Jan 2012 by Peter_in_2780
What's wrong with the wildcard form of copy command? copy /b sourcesdir\*.* destfile or something very similarComment: The actual copying of the files is nothing compared to finding, opening, closing them, etc. That explains why wildcards is the big speedup. Not a line of code to write,...
7 Aug 2014 by João Silva
My problem initially was to ensure that an instance of filesystemwatcher could recover from lost of network in a remote directory monitoring, or if de directory its was monitoring were to deleted and created again.After a while searching the web I came up with this:class watcher{ ...
7 Aug 2014 by gggustafson
You repeat the start code in NotAccessibleError. I believe that a simple rewrite of start would improve your code. The following is an example. Here m_Watcher has been replaced by file_watcher. Also, file_watcher is expected to be initialized to null in the class variable declarations. ...
17 Feb 2011 by TomQuinn
A simple function used to determine if a file path refers to a network drive and if it does convert it to use the UNC path
20 Feb 2011 by Prerak Patel
Here is an API way using WNetGetUniversalNameImports System.Runtime.InteropServices _ Private Shared Function GetUName(ByVal Path As String, ByVal outName As Integer, ByVal bObj As...
28 Mar 2012 by Vaibhav_J_Jaiswal
I want to create an ini file through coding. If on application path ini file is not found then application itself create the ini file with the section and the name. And after creation the default value is filled from the code. Is this possible in embedded visual c++? If yes the tell me and help...
28 Mar 2012 by MehdiNaseri
C# : if (!System.IO.File.Exists("YourFileName.ini")) { System.IO.File.Create("YourFileName.ini"); }Visual C++ : if (!File::Exists("YourFileName.ini")) { File::Create("YourFileName.ini"); ...
30 Mar 2012 by Vaibhav_J_Jaiswal
I create the ini file run time but whenever I write any value in the section using WriteProfileString() it requires the registry key.CFile obFile;if( obFile.Open( strAppIniPath, CFile::modeCreate|CFile::modeNoTruncate|CFile::modeReadWrite )){ AfxMessageBox(_T("File...
30 Dec 2013 by Afzal Shaikh
I have database backup file but extension is not being coming up while i have unchecked file extension from folder options but still unable to see what extension that file have?In File System(Drive D:) , Type: File is coming up for that file.Unable to attach and restore that file...
31 Dec 2013 by OriginalGriff
Probably, when you saved it yoU overrode thE extension and didn't give it any - so it is saved asFilenamerather than Filename.extFilename.bakFilename.sqlOr similar.Look at the file in Windows Explorer and open the "Organise" drop down.Select "Folder and Search Options" and then the...
31 Dec 2013 by Afzal Shaikh
There were not assigned to permissions to sql current user.I have solved :)
23 Feb 2011 by mhrglbdn
Hii..This project working, this one problem...Datagridview to excel export cells, but ı'am questions format, according to data in color, pattern, the table would appear to be doing...I want to make pictures of anyone who wants to tell how many ways...have a nice day...thank...
17 Mar 2011 by sairam.bhat
see thsi link it may help to uhttp://itsrashid.wordpress.com/2007/05/14/export-dataset-to-excel-in-c/[^]
22 Sep 2020 by Kats2512
Hi,I have a wrote some code to delete a list of files from certain folders on my pc.I have encountered a small problem where a file is open by another process and it can not be deleted.Does anyone know of any vb code that would help sort this problem I am having?Here is my code...
30 Sep 2013 by Rakesh Meel
visit here...http://www.vbforums.com/showthread.php?658181-RESOLVED-Process-cannot-access-a-file-because-it-is-being-used-by-another-process[^]
14 Dec 2020 by Member 10690594
1) You should Try to find the default program(executable) of the file: Dim key As Microsoft.Win32.RegistryKey = Microsoft.Win32.Registry.ClassesRoot Dim secondKey As String Dim rtn As String = "" If Not ext.StartsWith(".") Then ...
15 Nov 2014 by Zoltán Zörgő
Well, that's not easy. For a file to be deletable, there has to be no open handles to it.You can either terminate or kill the processes helding those handles, or close the handle itself. Be careful, the other process won't be aware of this. You might crash important applications - but could...
22 May 2013 by Captain Price
When programming in C/C++ you will need to store some data for the use of your application, obviously. For this you'll use the RAM. If the size of your data will be increased or decreased, you will use different data structures like linked lists, trees, hatches...etc.Everything is just fine...
21 May 2013 by Richard MacCutchan
You just need to design a structure for your file that will allow you to write the data such that you can read it back and re-create the memory content. If your data is fixed size then you can just write in fixed length blocks, if it is variable then you need to write control fields at the...
22 May 2013 by shailesh91082
While processing with files, maintain following thumb rules1. collect all the data required in your own defined data structure like, linked list or structures etc.2. Before exiting the program, open the file3. dump all the data to the file.4. close the filemake sure that you open the...
16 Jan 2012 by Member 7984120
Hello, Guys!I have small question about 2 parameters of IoCreateFile. What means combination of DesiredAccess = SYNCHRONIZE and ShareAccess = 0? Is it full access to the file, can I read and write to file opened only with this flags?Thanks!
29 Jan 2012 by amertarekt
to know the mean of DesiredAccess values go there http://www.osronline.com/ddkx/kmarch/k111_9dte.htm[^]share access:is means what to shared between threads on the programFILE_SHARE_READ : all threads can read this fileFILE_SHARE_WRITE : all threads can write on this...
7 May 2012 by casa cargo
29 Apr 2012 by Erik Rude
Hi, I've been tinkering with the WPF Folder Browser to enhance it by introducing a couple of new features. During this work I ran into a curious issue with DirectoryInfo.Attributes that failed to respond quickly for a certain folder on our network.What I do in short is checking all folders...
1 May 2012 by SASS_Shooter
The first thing I would suggest, then, is to get the sniffer trace run. It could be something as simple as challenge/response timing out, in which case you work to get the timing increased so you get the response back in enough time.It may also show you if you are getting fragmented packets...
6 Mar 2016 by FrostedSyntax
How to create batch files that make navigating the filesystem in the command prompt a breeze.
27 Dec 2013 by sora97
I am creating an antivirus program, my problem is,I need to load text file to my textbox in order to know if my antivirus detected a virus. It basically searches for the given string in the textbox and if it matches then it found a virus using the FIleSystemWatcher. The problem is it takes a...
28 Dec 2013 by Dave Kreskowiak
If all you're doing is searching a text file for a string, why are you even loading it into a TextBox?? Don't.
5 Jul 2012 by Akkywadhwa
Hi guys,I have written a program to retrieve the contents of a pc. But this program worked only in windows xp.I was unable to perform its full functions in windows 7. Code is here:using System;using System.Collections.Generic;using System.Linq;using System.Text;using...
5 Jul 2012 by Sergey Alexandrovich Kryukov
This code makes no sense even in XP, it's working only by luck. I don't want to analyze it all. Look at "D:\\contents.txt". This file location is illegal in Windows 7 and makes no sense event in XP. Of course, you can do some administration work on each system and make "D:" accessible, but it...
21 Jul 2011 by Manish Kumar Namdev
Hello Friends...I am using ASP.net C# to read the excel file and get it first column data in ArrarList.I wrote a code but couldn't achieve it.I used Excel name space and took a reference of Introp.Excel.dllPlease help me.RegardsManish Kumar Namdev
21 Jul 2011 by Mohammad A Rahman
Please see below,Reading excel column value to a string array[^]hope it helps :)
21 Jul 2011 by Abhinav S
You have not posted any code, so its not that easy to help you out.Try and have a look at Faster MS Excel Reading using Office Interop Assemblies[^], it could help you figure out your mistake.
3 May 2012 by Jashobanta
Hi,I am trying to FTP certain files from Client system to my own system using a C# application. As the backend is a mainframe PS, so normally I use DOS commands in client systems to login and then FTP the files. But now, I am thinking of automating it a little bit by creating an application...
2 May 2012 by Alan N
You sayWhen I create the batch files, it is created successfully, but while executing it, it opens another instance of the .NET application.I'm not clear if you are running the batch file at all, as it would not start the .NET application unless it contained a command to do...
3 May 2012 by Hex01
After the line:sw.Write("cd U:\\jashobanta"+Environment.NewLine);add this line:sw.Write("U:" + Environment.NewLine);Hope this helps!!
19 Mar 2013 by Igor Stanic
Extending boost::filesystem for Windows and Linux.
19 Mar 2013 by Igor Stanic
Manage Linux Trash and Windows Recycle Bin with C++.
U 8 May 2024 by Brian C Hart
This is a guide, written at an intermediate level, to performing high-speed search and replace operations across thousands of files in C# using advanced techniques such as memory-mapped files, asynchronous processing, and user-friendly interfaces with modal progress dialogs.
23 Aug 2010 by Archman420
hi i am using visual studio 2008 and developing an application in C++/CLI. My application does some file IO. the directory structure is as follows"C:\Program Files\AppName\Data\settings.dat"im working on my laptop with windows vista. the programm does not allow me to create or read the...
23 Aug 2010 by #realJSOP
Vista doesn't allow you to make changes to any folder in the Program Files folder. You have to use one of the special folders for Vista and later.Google this and pick your poison from the returned results set:"C++ vista special folders"EDIT -------You can make your setup program...
15 Nov 2011 by Indrajeet Valera
23 Apr 2011 by aditya kiran maroju
Hi ,Can any one guide me how to create a file Explorer in winformsMy requirement is i want a tree view to display all the directortes in the directories in the system and on clicking the particular folder in the tree view i want to display all the text files with size and date in the...
23 Apr 2011 by Ed Nutting
I would suggest you start by looking at the System.IO namespace with specific reference to the File and Directory classes. The static methods of the Directory class include GetDirectories (which will return top level or all sub directories of a directory you specify) and also GetFiles which will...
17 Nov 2010 by Dr. Kelwin
Hi, all! :)I have FS filter which are processing IRP_MJ_READ/IRP_MJ_WRITE etc. How can I detect mapped files in those requests? Maybe exists some flags, routines etc?Thanks! :)
20 Apr 2012 by JohnDepth
Hello :)I'm working on a project which deals with simulating the unix file system or any other file system.I can invent my own as well. I'm developing a unix like shell which will provide all the file handling commands similar to unix.Basically I want to allocate a large file on the actual...
20 Apr 2012 by Sergey Alexandrovich Kryukov
Sorry that I don't give you the full answer, because this is way too big topic for this Quick Questions & Answers.I only want to bring to your attention that you already trying to make a wrong assumption about Unix file systems. More exactly, there are many Unix-compatible file systems, so...
26 Oct 2017 by Sairam Kannan
Hello All,Following is my scenario:I will get xml file in my source folder and i have to pick them up and process create new xml file and place it in destination folder. I have a window service in my application in which i have included file system watcher concept for performing above...
9 Apr 2013 by Sergey Alexandrovich Kryukov
This is not really a "solution", but something you should better be aware of; please see these CodeProject articles:FileSystemWatcher - Pure Chaos (Part 1 of 2)[^],FileSystemWatcher - Pure Chaos (Part 2 of 2)[^].—SA
22 Apr 2013 by Sairam Kannan
Hi All,After couple of days i was able to find a solution by replicating the same scenario in my development enviroment just the way it was on my test environment. I requested the team member of external system to FTP sample file i post from my archive test files to my polling folder.I...
23 Apr 2013 by Ian A Davidson
I am sorry that I only saw this question today. I have a several years' experience with FileSystemWatcher (and with the Win32 API functions when using C++ before C#).These are the main areas to look out for:1) As you said, make sure the code that handles notifications is as quick as...
11 Nov 2015 by eqxvip
Hi!I had the same problem and reading your solution I realized why. In our code we where listening to CREATED event filtering on XML files as you. This event is always triggered, but since most SFTP software supports continuation on errors the files are created using a temp extension like...
18 Jan 2011 by Mandavali
I am trying to create the screen from which I can upload file.Here is the thing. I don't want to save on same location as website. But Want to save on different website folder.Is is possible to do thatGetfile from Website1 using upload control and store it on website2 folderThank you
18 Jan 2011 by fjdiewornncalwe
If your web application has permission to the folder where you want to write the file, then you simply have to save the file to that folder in your code behind. Go forth and code it. If you run into problems with that, feel free to update your question and we can help you with syntax issues if...
29 Jan 2012 by Zillo7
I'm currently working on a project that would prevent write access to a usb flash drive when it's inserted into a machine. I've looked into using the FileIOPermission class to make the assembly have read-only access, but would using that class prevent other applications from writing to the...
29 Jan 2012 by BillWoodruff
The first thought that comes to mind is using a USB flash-drive that can be password-protected. This company claims its password-protection software is free: [^], but I have never used it.This CP article may be helpful as a starting point: "Developing a USB Storage Device Protection Tool...
11 May 2011 by JohnLBevan
Hi Guys,I'm once again after some advice. . . I've recently updated some code to use a FileStream. The reason for this is I encounterred an exception due to a file being deleted by a seperate application between calling an XmlDocument.Save(path) method and calling my SetOwner(path,...
11 May 2011 by Rick Shaub
You can still use File.SetAccessControl() in your new method in place of FileStream.SetAccessControl(). I'd be willing to bet it works, too. MSDN actually recommends this practice:"While the FileStream class and SetAccessControl can be used on an existing file, consider using the...
11 May 2011 by JohnLBevan
That's great - thanks Rick!I've now updated my code as per your recommendation (included below), and it works perfectly. I'd not tried this as I thought the lock was owned by the file stream, so accessing the file from a different object would cause issues - nice to learn otherwise...
30 Dec 2010 by Jibrohni
Hi all,I've got myself a little problem whilst implementing the FileSystemWatcher Class. I have a text file that it is "watching" for me. When the file changes I have my app spit out the new line to my form. This works, but I tend to get an IOException when I run it without breakpoints in. I...
30 Dec 2010 by Dave Kreskowiak
Im just guessing because you didn't supply the exception message, but it sounds like you're opening the file while the process that is writing to it still has it open.Modify your code so that it retrys the file operations. If it gets an exception, wait a second or two and go back and try it...
30 Dec 2010 by Jibrohni
The file is getting updated very frequently so I had to implement a timer that checked it with a tick frequency of 1. I copy the original file and just deal with the copied file so I don't interrupt the original. - Jibrohni 1 sec ago
12 Nov 2011 by amit_upadhyay
Alright first my situation :1) a text document which has content like :uber|uber|ultrataxi|taxi|taxi cab|cab|minicab|airport taxi|airport transfergenitalia|genitalia|genitalsskincare|skincare|skin care|cosmetic|natual skin care|natural skin...
12 Nov 2011 by Wayne Gaylard
You should try using regular expresions to find matches. Something like thisDim fileName As String = "D:\Documents\test.txt" Dim srText As New StreamReader(fileName) Dim text As String = srText.ReadToEnd() srText.Close() Dim regMatch As String =...
17 Dec 2011 by hassan vaezi
Hi everyone,I have a file that has a new format and i can't read it by .NET.The Extension of the file is *.VOL and it's about Ultrasound Image systems. (KRETZFILE 1.0)Would you please help me?
17 Dec 2011 by DaveAuld
After doing various searches on the big G, the best option might be to email the manufacturer or the guys here; http://www.tomovision.com/download/download.htm[^] They apparently have a file viewer that can read the format.
17 Dec 2011 by Amir Mahfoozi
As I understood its format is DICOM so try to analyze this open source software :http://www.osirix-viewer.com/[^]Or you can convert it to a wellknown format :Converting a DICOM image to a common graphic format and vice versa with DCMTK and...
21 Mar 2012 by Member 8748235
I'm trying to do some research around file systems and I've probably confused myself. I've got to disk scheduling algorithms for devices with discs such as SCAN and CSCAN, but I was wondering what the equivalents are for flash memory?
21 Mar 2012 by Sergey Alexandrovich Kryukov
I don't think the whole notion of such algorithm is applicable to the flash devices at all."Removable flash memory cards and USB flash drives have built-in controllers to perform wear leveling and error correction so use of a specific flash file system does not add any benefit.", according...
15 Nov 2010 by Dr. Kelwin
Hi, guys!I have small FS filter which compress files on IRP_MJ_WRITE and decompress on IRP_MG_READ. If file operation goes to FS cache (FO_CACHE_SUPPORTED) I pass through this IRP, because it's no reason to compress/decompress files in cache. But in some situations I see file operations with...