files

What is a better file copy alternative than the Windows default?

I need to copy hundreds of gigs of random files around on my computer and am pretty leery of using the vanilla file copy built into Windows. I don't want it to hang on a "Are you sure?", "Are you really sure?", "Even zip files?", "Surely not read-only files too!" loop as soon as I step away. I don't want it to work for hours and then s...

CSV File Imports in .Net

I realize this is a newbie question, but I'm looking for a simple solution - it seems like there should be one. What's the best way to import a CSV file into a strongly-typed data structure? Again simple = better. Thanks....

Binary file layout reference

Where are good sources of information on binary file layout structures? If I wanted to pull in a BTrieve index file, parse MP3 headers, etc... where does one get reliable information?...

How do I use Java to read from a file that is actively being written?

I have an application that writes information to file. This information is used post-execution to determine pass/failure/correctness of the application. I'd like to be able to read the file as it is being written so that I can do these pass/failure/correctness checks in realtime. I assume it is possible to do this, but what are the gotch...

FileHelpers performance

Does anybody has some comments of performance of Filehelpers ? EDIT: Maybe some experience from day life usage ? @omaxx: what was toal size of your file?...

Binary patch-generation in C#

Does anyone have, or know of, a binary patch generation algorithm implementation in C#? Basically, compare two files (designated old and new), and produce a patch file that can be used to upgrade the old file to have the same contents as the new file. The implementation would have to be relatively fast, and work with huge files. It sho...

How do you open a file in C++?

I want to open a file for reading, the C++ way. I need to be able to do it for text files, which would involve some sort of read line function, and a way to do it for binary files, which would provide a way to read raw data into a char* buffer. ...

How do you determine the size of a file in C?

How can I figure out the size of a file, in bytes? #include <stdio.h> unsigned int fsize(char* file){ //what goes here? } ...

How do you get a directory listing in C?

How do you scan a directory for folders and files in C? It needs to be cross-platform. ...

Is FindFirstChangeNotification the best API to use for file system change notification on windows?

I'm new to windows programming and I'm trying to get notified of all changes to the file system (similar to the information that FileMon from SysInternals displays, but via an API). Is a FindFirstChangeNotification for each (non-network, non-substed) drive my best bet or are there other more suitable C/C++ APIs? ...

What is the best way to rename (move) file system branches in .NET?

I would like to rename files and folders recursively by applying a string replacement operation. E.g. The word "shark" in files and folders should be replaced by the word "orca". C:\Program Files\Shark Tools\Wire Shark\Sharky 10\Shark.exe should be moved to: C:\Program Files\Orca Tools\Wire Orca\Orcay 10\Orca.exe The same operation ...

Differences between unix and windows files

Am I correct in assuming that the only difference between "windows files" and "unix files" is the linebreak? We have a system that has been moved from a windows machine to a unix machine and are having troubles with the format. I need to automate the tranlation between unix/windows before the files get delivered to the system in our "...

Implementing a log watcher

I wondering how in C/C++ you can implement a program (similar to tail -f) that watches for new lines added to a log file and then process them? ...

About File permissions in C#

While creating a file synchronization program in C# I tryed to make a method 'copy' from LocalFileItem class that uses sing System.IO.File.Copy(destination.Path, Path, true) where Path is a string. After executing this code with destination.Path = "C:\Test2" and this.Path = "C:\Test\F1.txt" I get an exception saying that I do not have th...

Database query representation impersonating file on Windows share?

Is there any way to have something that looks just like a file on a Windows file share but is really a resource served up over HTTP? For context, I'm working with an old app that can only deal with files on a Windows file share, I want to create a simple HTTP-based service to serve the content of the files dynamically to pick up real ti...

Hooking my program with windows explorer's rename event

Is there any way, in any language, to hook my program when a user renames a file? For example: A user renames a file and presses enter (or clicks away) to confirm the rename action. BEFORE the file is actually renamed, my program "listens" to this event and pops up a message saying "Are you sure you want to rename C:\test\file.txt to C:...

Do you have any recommended File templates for resharper for VB.Net

The ones that stick out and make life usefull. ...

Find number of files in all subdirectories

Is there a way to find the number of files of a specific type without having to loop through all results inn a Directory.GetFiles() or similar method? I am looking for something like this: int ComponentCount = MagicFindFileCount(@"c:\windows\system32", "*.dll"); I know that I can make a recursive function to call Directory.GetFiles , ...

Cannot delete, a file with that name may already exist.

This is starting to vex me. I recently decided to clear out my FTP, and stumbled across an old Wordpress install I forgot I had (oh yes, very security conscious me). Anyway, for some reason deleting the directory failed so I investigated to see what was causing the blockage and I've narrowed it down to a file in wp-content. Now when I t...

get file version in powershell

How can you get the version information from a .dll or .exe file in PowerShell? Specifically interested in File Version, though other version info (i.e. Company, Language, Product Name, etc) would be helpful as well. ...