|
aircast 님이 쓰신 글 :
: 안녕하세요?
:
: file copy를 하는데 잘 안되어서 질문 올립니다.
:
: 고수님들 어디가 틀렸는지 봐주세요..
:
: /*****************************************************************************************
: String Sstr = ExtractFilePath(Application->ExeName)+"myconfig.cfg";
: String Tstr = (ExtractFilePath(Application->ExeName)+"Data\\"+CbxModel->Text.c_str()+"\\");
: if (! CopyFile(Sstr.c_str(), Tstr.c_str() , 1))
: {
: PNL_Result->Caption = "Copy Fail";
: }
: *****************************************************************************************/
:
: 감사합니다.
Tstr 변수에 타겟 경로가 잘못된듯하네요
요렇게 하시면 되실듯 ^^
String Sstr = ExtractFilePath(Application->ExeName)+"myconfig.cfg";
String Tstr = (ExtractFilePath(Application->ExeName)+"Data\\"+CbxModel->Text.c_str()+".cfg");
if (! CopyFile(Sstr.c_str(), Tstr.c_str() , 1))
{
PNL_Result->Caption = "Copy Fail";
}
|