0

I want to split a big file into smaller ones without copying part of file, and without using filestream or functions which use it (if it is possible).
Imagine, we have big file which is consisted of 3 files:

[[File1bytes][File2bytes][File3bytes]]

In my opinion we can do this with these steps:

  1. Use SetEndOfFile function to truncate the bytes of the last file ([File3bytes] in our example)

  2. Somehow force our file system to recognize those truncated bytes ([File3bytes]) as a real file (maybe by adding some info to MFT table, or doing something with NTFS if it is possible, or using some function or method which can do all mentioned for us).

Any suggestions?

Biffen
  • 6,249
  • 6
  • 28
  • 36
Jet
  • 528
  • 6
  • 17
  • 1
    Which operating system, and do you want it to be done inside C++? NTFS so Windows? – ilent2 May 01 '14 at 12:10
  • Yes, I would like to see it done on Windows. C++ is preferable but optional. I just want to understand how to do it if it is possible. – Jet May 01 '14 at 13:40

1 Answers1

0

How about create a file system nesting over the existing file system where the very large file actually resides and define some IOCTL commands for splitting? Check this link:

How can I write my own 'filesystem' within Windows?

Community
  • 1
  • 1
Rico Wang
  • 89
  • 6