Click here to Skip to main content
15,914,899 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Seeking in large files (pref. STL) Pin
David Crow17-Sep-08 7:29
David Crow17-Sep-08 7:29 
GeneralRe: Seeking in large files (pref. STL) Pin
Trollslayer17-Sep-08 8:05
mentorTrollslayer17-Sep-08 8:05 
QuestionHow does my app know the recent files? Pin
frqftgbdafr17-Sep-08 6:33
frqftgbdafr17-Sep-08 6:33 
AnswerRe: How does my app know the recent files? Pin
David Crow17-Sep-08 6:50
David Crow17-Sep-08 6:50 
GeneralRe: How does my app know the recent files? Pin
frqftgbdafr17-Sep-08 9:07
frqftgbdafr17-Sep-08 9:07 
GeneralRe: How does my app know the recent files? Pin
Hamid_RT17-Sep-08 9:39
Hamid_RT17-Sep-08 9:39 
GeneralRe: How does my app know the recent files? Pin
David Crow17-Sep-08 9:59
David Crow17-Sep-08 9:59 
QuestionMoveFile Problem Pin
roguecode17-Sep-08 3:53
roguecode17-Sep-08 3:53 
First of all i would like to say am very new to C++ and am probably asking somethingthing very simple. i am trying to write a win32 console application that moves files from one folder to another on the same drive.

when i call the win32api's MoveFile function it fails with the following error "The filename, directory name, or volume label syntax is incorrect". below is the offending piece of code.

i have checked the file exists and the destination folder also exists.


void BackupFile(string* origpath,string* filename,string* unitid,string* owner,string*month)
{
	
	WIN32_FIND_DATA win32_find_data;
	HANDLE handle;
	
	string dest;
	dest = "C:\\data_2008\\" + *owner + "\\" + *unitid + "\\"+ *month;	
	
	handle = FindFirstFile((dest+"\\*.*").c_str(),&win32_find_data);
	if(handle != INVALID_HANDLE_VALUE)
	{
		/*directory found*/
		/*append the filename to the destination path*/
		dest += "\\" + *filename;
		if(!(MoveFile(origpath->c_str(),dest.c_str())))
		{
			/*there was a problem send*/
			DeleteFile(origpath->c_str());
		}
	}
}


any help will be highly appreciated
QuestionRe: MoveFile Problem Pin
Michael Schubert17-Sep-08 4:30
Michael Schubert17-Sep-08 4:30 
AnswerRe: MoveFile Problem Pin
Cedric Moonen17-Sep-08 4:38
Cedric Moonen17-Sep-08 4:38 
AnswerRe: MoveFile Problem Pin
roguecode17-Sep-08 6:41
roguecode17-Sep-08 6:41 
GeneralRe: MoveFile Problem Pin
Cedric Moonen17-Sep-08 6:52
Cedric Moonen17-Sep-08 6:52 
QuestionRe: MoveFile Problem Pin
roguecode17-Sep-08 7:15
roguecode17-Sep-08 7:15 
AnswerRe: MoveFile Problem Pin
Rajesh R Subramanian17-Sep-08 20:13
professionalRajesh R Subramanian17-Sep-08 20:13 
AnswerRe: MoveFile Problem Pin
CPallini17-Sep-08 21:38
mveCPallini17-Sep-08 21:38 
Questionhow to add Ip address in the registry value Pin
adhilingam17-Sep-08 3:02
adhilingam17-Sep-08 3:02 
AnswerRe: how to add Ip address in the registry value Pin
Iain Clarke, Warrior Programmer17-Sep-08 5:21
Iain Clarke, Warrior Programmer17-Sep-08 5:21 
GeneralRe: how to add Ip address in the registry value Pin
adhilingam21-Sep-08 20:51
adhilingam21-Sep-08 20:51 
AnswerRe: how to add Ip address in the registry value Pin
Mark Salsbery17-Sep-08 6:05
Mark Salsbery17-Sep-08 6:05 
GeneralRe: how to add Ip address in the registry value Pin
adhilingam18-Sep-08 20:43
adhilingam18-Sep-08 20:43 
QuestionHow to set the Text of a CListCtrl Column Header dynamically in mfc Pin
Dhiraj kumar Saini17-Sep-08 3:01
Dhiraj kumar Saini17-Sep-08 3:01 
AnswerRe: How to set the Text of a CListCtrl Column Header dynamically in mfc Pin
Iain Clarke, Warrior Programmer17-Sep-08 6:03
Iain Clarke, Warrior Programmer17-Sep-08 6:03 
GeneralRe: How to set the Text of a CListCtrl Column Header dynamically in mfc Pin
Dhiraj kumar Saini18-Sep-08 1:23
Dhiraj kumar Saini18-Sep-08 1:23 
GeneralRe: How to set the Text of a CListCtrl Column Header dynamically in mfc Pin
Iain Clarke, Warrior Programmer18-Sep-08 1:41
Iain Clarke, Warrior Programmer18-Sep-08 1:41 
QuestionHow can set font of property sheet or property pages? Pin
Le@rner17-Sep-08 2:57
Le@rner17-Sep-08 2:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.