Advanced programming question about renaming a file

 
I would like to rename a file (or copy, or move) in the experts\files default mt4 working directory, without external custom dlls, and without hard-coding the path name of the platform.
Does anyone has an idea how it can be possible?
The simple WinAPI functions doesn't seem to work without full pathname. The WinApi functions for getting pathname output pointers to buffers (containing the pathname), and mql4 is incapable of handling pointers.
Is there a workaround in someone's head for this? Or only a custom dll (capable of working with pointers), or separate program could handle this...

Thanks in advance
 
handleA = FileOpen(fileA, FILE_READ|FILE_BIN);
handleB = FileOpen(fileB, FILE_WRITE|FILE_BIN);
while(!FileIsEnding(handleA)){
   FileWriteString(handleB, FileReadString(handleA,1) , 1);
}
FileClose(handleA);
FileClose(handleB);
FileDelete(HandleA);

There's my idea, clumsy, might work.

string FileReadString( int handle, int length=0)
The function reads the string from the current file position. Applies to both CSV and binary files. For text files, the string will be read before the delimiter. For binary file, the given count of characters will be read to the string. To get the detailed error information, one has to call the GetLastError() function.

int FileWriteString( int handle, string value, int length)
The function writes the string to a binary file from the current file position.

 
Oh, man. I should rename it to basic question, as there is a function for getting path in Mql4, so my whole question was unnecessary. Well, actually I've never bumped into terminal functions. :) Thanks for the help though!

string TerminalPath( )
Returns the directory, from which the client terminal was launched.
 

I never saw that one either... Could be handy...

Reason: