DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   C++ (http://www.daniweb.com/forums/forum8.html)
-   -   Win32API Movefile() Pathname problem (http://www.daniweb.com/forums/thread161644.html)

spodder Dec 10th, 2008 12:59 pm
Win32API Movefile() Pathname problem
 
I have a problem with the MoveFile() function of the Win32 API.
I cant move files which are in the same directory as the exe file,if i specify the pathname,it dosent work.I dont know how this function works.Need urgent help.......
# include<windows.h>
# include<iostream.h>
int main()
{
      MoveFile("C:\File1.txt","C:\New Folder\File2.txt");
}

Freaky_Chris Dec 10th, 2008 1:39 pm
Re: Win32API Movefile() Pathname problem
 
You should double backslash \\

Chris

spodder Dec 10th, 2008 2:10 pm
Re: Win32API Movefile() Pathname problem
 
Thanks a lot Chris.Its working

Freaky_Chris Dec 10th, 2008 2:28 pm
Re: Win32API Movefile() Pathname problem
 
If thast all mark as solved please

Chris


All times are GMT -4. The time now is 10:19 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC