Download MetaTrader 5

How to create a Folder in System Drive and a File inside the Folder?

To add comments, please log in or register
Kashif Javed
Kashif Javed  
#import "kernel32.dll"
   int CreateFileW(string, uint, int, int, int, int, int);
   int GetFileSize(int, int);
   int ReadFile(int, uchar&[], int, int&[], int);
   int CloseHandle(int);

How can I create a folder( e,g "AAAA") inside System Drive(Windows Drive)?
How to create a file inside "AAAA" folder?
How to read that file created in AAAA folder?

I was using this but now it does not work in build 600+
I tried but no success. Any help please.

For guessing the correct system drive I read the "COMMON" data path variable, which I assume to lead to the system drive.

For placing a new directory I use kernel32::CreateDirectoryW command.

For creating a file inside the directory I use kernel32::CreateFileW command.

To add comments, please log in or register