제발 도와 주세요!!!
도저히 몰겠습니다.... 이 눔이 왜 하나의 파일만 받아가지고 오는지요!!!
소스 밑부분에 내용이 있으니깐 조언 좀 부탁드립니다...
==================================================================================
procedure TForm1.StartUp;
begin
NMFTP1.Host := 'hostip';
NMFTP1.Port := 21;
NMFTP1.Timeout := 0;
NMFTP1.UserID := 'userid';
NMFTP1.Password := 'pw';
try
NMFTP1.Connect;
except
On E:Exception do
if E.message='something'
then writeln('poo');
end;
//NMFTP1.List;
NMFTP1.Nlist;
//NMFTP1.Download((to_date + IntToStr(cnt)+'.txt'), ('C:A' + (to_date + IntToStr(cnt))+ '.txt'));
end;
procedure TForm1.NMFTP1ListItem(Listing: String);
begin
FileListBox1.Items.Add(Listing);
end;
procedure TForm1.TimerInterfaceTimer(Sender: TObject);
var
license,name: String;
//cnt: Integer;
begin
//cnt := 0;
TimerInterface.Enabled :=false;
TimerInterface.Interval := 30000; //30초 단위
Increase;
TimerInterface.Enabled :=True;
end;//procedure TForm1.TimerInterfaceTimer(Sender: TObject);
procedure TForm1.Increase; -------------------------|
var |
i: Integer; |
begin | 이부분에서
With ListBox1 | 이렇게하면
begin | ListBox에 있는 파일들을
for i := 0 to (ListBox1.Items.Count-1) | FTP의서버폴더에서
begin | 텍스트파일을 하나밖엔
NMFTP1.Download(ListBox1.Items.Strings[i], 'C:A'+ ListBox1.Items.Strings[i]); | 다운을 받지
DbTry; | 않습니다..
except begin |리스트박스에는
StatusBar1.SimpleText := 'Downloading~'; | 서버폴더의
end; | 파일들이
end; | 다 표시되는데요!!!
end; ---- ---------------------------------------------|
procedure TForm1.DbTry;
begin
If FileExists('C:A' + ListBox1.Items.Strings[i]) = True Then
begin
AssignFile(Reader,'C:A' + ListBox1.Items.Strings[i]);
Reset(Reader);
Readln(Reader,S);
end
//Showmessage('연결이 되었으니 작업을 합니다.');
end;
end.
==================================================================================
다운받으면 그 파일을 차례대로 읽어와서 디비에 넣는건데요!!
파일을 디비에 넣는건 잘 되는데요!!
ListBox에있는 파일을 차례로 다운을 받을려고 하는데 계속하나의 파일만을 받고
디비 작업을 하는데요!! ㅜ.ㅜ;;!
고수님들 좀 갈켜 주세요!!
ListBox의 내용을 배열로 선언해서리 다운로드 받고 싶은데....잘 안되요!!
좀 구해 주세요!!! 살려 주세요!!! 헬~~푸~~요!!
지발 좀 도와 주세요!!!
> 제발 도와 주세요!!!
> 도저히 몰겠습니다.... 이 눔이 왜 하나의 파일만 받아가지고 오는지요!!!
> 소스 밑부분에 내용이 있으니깐 조언 좀 부탁드립니다...
> ==================================================================================
> procedure TForm1.StartUp;
> begin
> NMFTP1.Host := 'hostip';
> NMFTP1.Port := 21;
> NMFTP1.Timeout := 0;
> NMFTP1.UserID := 'userid';
> NMFTP1.Password := 'pw';
> try
> NMFTP1.Connect;
>
> except
> On E:Exception do
> if E.message='something'
> then writeln('poo');
> end;
> //NMFTP1.List;
> NMFTP1.Nlist;
> //NMFTP1.Download((to_date + IntToStr(cnt)+'.txt'), ('C:A' + (to_date + IntToStr(cnt))+ '.txt'));
> end;
>
> procedure TForm1.NMFTP1ListItem(Listing: String);
> begin
> FileListBox1.Items.Add(Listing);
> end;
>
> procedure TForm1.TimerInterfaceTimer(Sender: TObject);
> var
> license,name: String;
> //cnt: Integer;
> begin
> //cnt := 0;
> TimerInterface.Enabled :=false;
> TimerInterface.Interval := 30000; //30초 단위
> Increase;
> TimerInterface.Enabled :=True;
> end;//procedure TForm1.TimerInterfaceTimer(Sender: TObject);
>
> procedure TForm1.Increase; -------------------------|
> var |
> i: Integer; |
> begin | 이부분에서
> With ListBox1 | 이렇게하면
> begin | ListBox에 있는 파일들을 ⓐ<---
> for i := 0 to (ListBox1.Items.Count-1) | FTP의서버폴더에서
> begin | 텍스트파일을 하나밖엔
> NMFTP1.Download(ListBox1.Items.Strings[i], 'C:A'+ ListBox1.Items.Strings[i]); | 다운을 받지
> DbTry; | 않습니다..
> except begin |리스트박스에는
> StatusBar1.SimpleText := 'Downloading~'; | 서버폴더의
> end; | 파일들이
> end; | 다 표시되는데요!!!
> end; ---- ---------------------------------------------|
>
> procedure TForm1.DbTry;
> begin
> If FileExists('C:A' + ListBox1.Items.Strings[i]) = True Then ⓑ<----
> begin
> AssignFile(Reader,'C:A' + ListBox1.Items.Strings[i]);
> Reset(Reader);
> Readln(Reader,S);
> end
> //Showmessage('연결이 되었으니 작업을 합니다.');
> end;
>
> end.
> ==================================================================================
> 다운받으면 그 파일을 차례대로 읽어와서 디비에 넣는건데요!!
> 파일을 디비에 넣는건 잘 되는데요!!
> ListBox에있는 파일을 차례로 다운을 받을려고 하는데 계속하나의 파일만을 받고
> 디비 작업을 하는데요!! ㅜ.ㅜ;;!
> 고수님들 좀 갈켜 주세요!!
> ListBox의 내용을 배열로 선언해서리 다운로드 받고 싶은데....잘 안되요!!
> 좀 구해 주세요!!! 살려 주세요!!! 헬~~푸~~요!!
> 지발 좀 도와 주세요!!!
★ i가 ⓐ과 ⓑ 다른변수 거든여.. 위의 소스만 볼경우
음냐...그럼 즐코 하셔여...