Move from FTP and count in Target folder automated

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Message
Author
abc0502
Posts: 1007
Joined: 26 Oct 2011 22:38
Location: Egypt

Re: Move from FTP and count in Target folder automated

#46 Post by abc0502 » 27 Nov 2012 07:12

aaksar wrote:now i m giving the path of the folder which contains only 3 zip files, and i have given file count 15, but after copying file it came out from script and not poling for remaining files.

for zip its window default i think.

and the folder where the files are downloaded at, how many files is there, because that is the folder where the batch check the number. it doesn't check the number on the ftp

aaksar
Posts: 105
Joined: 17 Nov 2012 05:13

Re: Move from FTP and count in Target folder automated

#47 Post by aaksar » 27 Nov 2012 07:13

Code: Select all

ftp> open ftp.us.abc.com
User (ftp.us.abc.com:(none)):

ftp> lcd "D:\folder"
Local directory now D:\folder.
ftp> cd "3 nals\ab System"
ftp> get "20120911.zip"
ftp> get "0120911.zip"
ftp> get "ABANK.zip"
ftp> disconnect
ftp> Bye
The system cannot find the path specified.

C:\Users\SERVIC~1\AppData\Local\Temp\3>

aaksar
Posts: 105
Joined: 17 Nov 2012 05:13

Re: Move from FTP and count in Target folder automated

#48 Post by aaksar » 27 Nov 2012 07:16

for zip its window default i think.[/quote]
and the folder where the files are downloaded at, how many files is there, because that is the folder where the batch check the number. it doesn't check the number on the ftp[/quote]


there are only 3 script file in the target folder.

window zipped prgrm is compressed folder i think

abc0502
Posts: 1007
Joined: 26 Oct 2011 22:38
Location: Egypt

Re: Move from FTP and count in Target folder automated

#49 Post by abc0502 » 27 Nov 2012 07:22

ok,
I think it is because of the missing 7z program
for now, add two : like this "::" without double quotes before this lines

Code: Select all

::     "%zip_program%" x -y "%~5\*.zip" -o"%~5" >nul
::     Del /F /Q "%~5\*.zip" >nul

abc0502
Posts: 1007
Joined: 26 Oct 2011 22:38
Location: Egypt

Re: Move from FTP and count in Target folder automated

#50 Post by abc0502 » 27 Nov 2012 07:26

Found the windows built in compress tool :D

try

Code: Select all

 compact.exe /?

in command line

source : Link
Last edited by abc0502 on 27 Nov 2012 07:27, edited 1 time in total.

aaksar
Posts: 105
Joined: 17 Nov 2012 05:13

Re: Move from FTP and count in Target folder automated

#51 Post by aaksar » 27 Nov 2012 07:27

result is same after 3 files its come out from FTP and no more polling.

abc0502
Posts: 1007
Joined: 26 Oct 2011 22:38
Location: Egypt

Re: Move from FTP and count in Target folder automated

#52 Post by abc0502 » 27 Nov 2012 07:28

ok remove/delete these two lines

edit
and make sure the local folder is empty every time you test the batch again
Last edited by abc0502 on 27 Nov 2012 07:34, edited 1 time in total.

aaksar
Posts: 105
Joined: 17 Nov 2012 05:13

Re: Move from FTP and count in Target folder automated

#53 Post by aaksar » 27 Nov 2012 07:31

after removing the 2 lines its not giving me below error but result is same no poling

Code: Select all

ftp> disconnect
ftp> Bye
The system cannot find the drive specified.

aaksar
Posts: 105
Joined: 17 Nov 2012 05:13

Re: Move from FTP and count in Target folder automated

#54 Post by aaksar » 27 Nov 2012 07:37

abc0502 wrote:ok remove/delete these two lines

edit
and make sure the local folder is empty every time you test the batch again



there is no files in the target folder

abc0502
Posts: 1007
Joined: 26 Oct 2011 22:38
Location: Egypt

Re: Move from FTP and count in Target folder automated

#55 Post by abc0502 » 27 Nov 2012 07:40

Ok, we need to know where exactlly the error is.
add
pause

before this line
:: Check files count

and run the batch

aaksar
Posts: 105
Joined: 17 Nov 2012 05:13

Re: Move from FTP and count in Target folder automated

#56 Post by aaksar » 27 Nov 2012 07:45

result is

Code: Select all

ftp> open ftp.us.abc.com
User (ftp.us.abc.com:(none)):

ftp> lcd "D:\test"
Local directory now D:\Test.
ftp> cd "3 nals\ab System"
ftp> get "20120911.zip"
ftp> get ".zip"
ftp> get "abank.zip"
ftp> disconnect
ftp> Bye
Press any key to continue . . .

C:\Users\service_infa>

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Move from FTP and count in Target folder automated

#57 Post by foxidrive » 27 Nov 2012 07:50

aaksar wrote:ftp> lcd "D:\test"
Local directory now D:\Test.
ftp> cd "3 nals\ab System"
ftp> get "20120911.zip"
ftp> get ".zip"
ftp> get "abank.zip"
ftp> disconnect
ftp> Bye


In case this isn't noticed - is that .zip right?

abc0502
Posts: 1007
Joined: 26 Oct 2011 22:38
Location: Egypt

Re: Move from FTP and count in Target folder automated

#58 Post by abc0502 » 27 Nov 2012 07:56

@Foxidrive, yes . it seems there is something went wrong when getting files names or it already a file named that way ???

Edited
@aaksar:
I found the error,
change "GEQ" with "EQU" at the block where we check the "%Fcount%"

aaksar
Posts: 105
Joined: 17 Nov 2012 05:13

Re: Move from FTP and count in Target folder automated

#59 Post by aaksar » 27 Nov 2012 08:21

Ok will test in couple of minutes.
Seems like some requirement change. Will update you

aaksar
Posts: 105
Joined: 17 Nov 2012 05:13

Re: Move from FTP and count in Target folder automated

#60 Post by aaksar » 27 Nov 2012 09:08

now its poling, thanks buddy

Post Reply