//아래의 소스에서
FilelistBox2.Directory := '.\OP\';
for i := 0 to FileListBox2.Items.Count - 1 do
begin
PathName := ExtractFileName(FileListBox2.Items.strings[i]);
FName := FileListBox2.Items.strings[i];
CopyFile(Pchar(Pathname)
,Pchar('c:\MyPg\Allcomp\OP\'+Fname)
,False);
end;
FilelistBox2.Directory := '.\OP\5.0\REALGRID\';
for i := 0 to FileListBox2.Items.Count - 1 do <<<-------①
begin
PathName := ExtractFileName(FileListBox2.Items.strings[i]);
FName := FileListBox2.Items.strings[i];
CopyFile(Pchar(Pathname)
,Pchar('c:\MyPg\Allcomp\OP\5.0\REALGRID\'+Fname)
,False);
end;
위와같이 하나의 filelistbox2 를 이용하여 directory Path를 변경해서 사용할수없는지요..자꾸 Error만 나옵니다..
-----① 부분에서 다음과 같은 Error가 납니다.
"""Project Pall_comp_install.exe raised excepton class ElnOutError with Message
'Invalid filname'.Process stopped.Use Step or Run to continue. """
라고 나옵니다.
FilelistBox1.Directory := 'D:\임시문서\프로그램사양서\';
for i := 0 to FileListBox1.Items.Count - 1 do
begin
PathName := ExtractFileName(FileListBox1.Items.strings[i]);
FName := FileListBox1.Items.strings[i];
showmessage(FName);
end;
FilelistBox1.Directory := 'D:\임시문서\화면레이아웃\';
for i := 0 to FileListBox1.Items.Count - 1 do
begin
PathName := ExtractFileName(FileListBox1.Items.strings[i]);
FName := FileListBox1.Items.strings[i];
showmessage(FName);
end;