ntfs

WriteFile for a symbolic link which points a network volume's file.

I made a symbolic link file. mklink C:\LinkFileToPointNetworkFile.txt Z:\NetworkFile.txt Then I opened and read the file. Good. It works well. The target file's data has been read. -Of course, I didn't use FILE_FLAG_OPEN_REPARSE_POINT But if I try writing to the file, I get a 'access is denied'. This is not what I expected. Why ...

Powershell Folder Inheritence problem

Hi, I am having problems with a powershell script i basically trying to reset the permission on a folder, by removing the following groups NT AUTHORITY\Authenticated Users BUILTIN\Users If i manually change the folder to not inherit from it parent the script works, I have look through google to find best way of removing the inherita...

Is there An Appllication For Testing Various File I/O In Windows?

I'm developing a network-redirector like SMB. I want to test various file I/O to compare NTFS or SMB implementation. What I want to test are, CreateFile Read, WriteFile DeleteFile RenameFile Set, GetFileInformationByHandle etc. And it' would be better if it can measure each I/Os duration. Is there a program I can use? ...

C++/Win32: How to wait for a pending delete to complete?

Please: There are no leaked handles [1]. The file is not open by anything in our software (it could be held open by an AntiVirus or a system indexing service, etc.) The code below can be compiled and run on your computer at home/office: you can see instantly that this loop fails and by itself NEVER attempts the Delete until after ALL h...

NTFS Performance under XP Pro SP3, recommendations for high amount of files?

I was wondering if there are any recommendations or features that one may remove/disable of NTFS under Windows XP Pro SP3 (32bits) - to gain performance while using it as an archive unit for millions of files? The only requirements for the archiving structure are filenames and their data, while having the ability to store millions of fi...

FILESYSTEM vs SQLITE, while storing up-to 10M files

I would like to store up-to 10M files, 2TB storage unit. The only properties which I need restricted to filenames, and their contents (data). The files max-length is 100MB, most of them are less than 1MB. The ability of removing files is required, and both writing and reading speeds should be a priority - while low storage efficiency, r...

How to enumerate paths for all NTFS hard links pointing to a file?

I can use GetFileInformationByHandle to determine the number of hard links associated with a file. How can I enumerate the paths which make up those links? For example, if C:\TEMP_1.BIN and C:\TEMP_2.BIN are hard links to the same content, and I determine from GetFileInformationByHandle that C:\TEMP_1.BIN has nNumberOfLinks=2, how can I...

How to get the LBA ranges, given a file?

Given a file, how can I get the LBA ranges corresponding to the file? Can FSCTL_GET_RETRIEVAL_POINTERS do the job? ...

How can I create a file with invalid Windows timestamps?

I'd like to create a file with an invalid created/modified/accessed timestamp to use in unit tests to ensure that my application can handle files with invalid timestamps. It's a Windows application written in C# that could run on both NTFS and FAT32 filesystems. ...

What is the difference between File.SetCreationTime() and File.SetCreationTimeUtc()

In particular, is there any difference between these two lines in terms of their outcomes: File.SetCreationTime("foo.txt", DateTime.UtcNow); File.SetCreationTimeUtc("foo.txt", DateTime.UtcNow); Perhaps File.SetCreationTimeUtc("foo.txt", DateTime.Now) is just another way of doing File.SetCreationTime("foo.txt", DateTime.UtcNow)? The s...

Unique file identifiers on NTFS and $Object_ID

From articles I have found online there appears to be two forms of unique identifiers for files on NTFS: Using Windows API GetFileInformationByHandle(), we can get access to the struct BY_HANDLE_FILE_INFORMATION, which contains a volume serial number and a low/high file index. http://msdn.microsoft.com/en-us/library/aa363788(VS.85).asp...

Get list of groups-users-permissions-special permission for a folder in Windows 2003, programatically

I use Window 2003 server, and I need get information about security folder, programatically using C#. I want create a tool for check permissions. I need get the groups, users, permissions and special permissions for a folder, C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeys edit: the follo...

Scripting rsync backup and restore from Windows to Linux

Hi, I have a fairly simply batch file to backup a Directory on Server 2008 using cwrsync to a Linux server, and to restore. Backup script: @ECHO OFF SETLOCAL SET CWRSYNCHOME=C:\Program Files (x86)\cwRsync SET CYGWIN=nontsec SET HOME=%HOMEDRIVE%%HOMEPATH% SET CWOLDPATH=%PATH% SET PATH=%CWRSYNCHOME%\BIN;%PATH% rsync -e "ssh -i new.key"...

How to create a sparse file on NTFS?

I'm testing a sparse file. But my test code doesn't work well. HANDLE h = CreateFileW(L"D:\\sparse.test", GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, 0, CREATE_ALWAYS, FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_SPARSE_FILE, 0); DWORD d = GetFileAttributes(L"...

Sparse Files and Disk Quotas

Suppose, My D: volume capacity is 100GB. And I'm using it 80GB now. The remain is only 20G. Now, I try to make a sparse file. DWORD written; std::wstring s = L"D:\\sparse9.test"; HANDLE h = CreateFileW(s.c_str(), GENERIC_WRITE, FILE_SHARE_DELETE, 0, CREATE_NEW, 0, 0); if(!DeviceIoControl( h, FSC...

methods for data recovery for a NTFS file ?

hello i need help about the methods for data recovery for NTFS file system. books atricles are also helpful thanx in advance ...

Does cygwin understand NTFS junction points?

Does cygwin (1.7.x) understand Windows NTFS junction points (as created by mklink in Win7/2008 or sysinternals' junction.exe)? How do they differ from a symbolic link as created by "ln -s "? ...