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");
}

Recommended Answers

All 3 Replies

You should double backslash \\

Chris

Thanks a lot Chris.Its working

If thast all mark as solved please

Chris

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.