• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 471
  • Last Modified:

Autodownload multiple files from batch

Dear EE member,
I can't download multiple files automatically via batch in Windows XP Pro. Here is the output:

ftp> open 10.1.1.1
Connected to 10.1.1.1.
....
User (10.1.1.1:(none)):
331 Password required for oracle.

230 User oracle logged in.
ftp> ascii
200 Type set to A.
ftp> cd /home/oracle/testdata
250 CWD command successful.
ftp> get reserveStock.csv
200 PORT command successful.
150 Opening ASCII mode data connection for reserveStock.csv (59584 bytes).
226 Transfer complete.
ftp: 60032 bytes received in 1.10Seconds 54.57Kbytes/sec.
ftp> get inventory.csv
Error opening local file inventory.csv.
> inventory.csv:Permission denied
ftp> quit
221 Goodbye.
finish.
Press any key to continue . . .

Any idea?

Regards,
Peter
0
peter_chong
Asked:
peter_chong
  • 3
  • 3
1 Solution
 
yuzhCommented:
It could be the file permission problem!

Could you please use (shell login, eg ssh, telnet to the server)
then
cd /home/oracle/testdata

do a
ls -al inventory.csv
to find out.
0
 
peter_chongAuthor Commented:
$ ls -al inventory.csv
-rwxr-xr-x   1 oracle     dba          11970 Aug  8 17:44 inventory.csv
$ ls -al reserveStock.csv
-rwxr-xr-x   1 oracle     dba          59584 Aug  8 17:46 reserveStock.csv

Anything wrong?

I can ftp the files manually, but not using batch.

Regards,
Peter
0
 
yuzhCommented:
Your FTP OS version please,
check if your FTP server support "mget".

can you do:
mget *.csv

in your batch file?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
peter_chongAuthor Commented:
My FTP command is from Windows XP Pro.

The following output come up after I use mget
command.

ftp> open 10.1.1.1
Connected to 10.1.1.1.
220 oracle FTP server (Version 1.1.214.7 Thu Aug 10 09:57:38 GMT 2000) ready.
User (10.1.1.1:(none)):
331 Password required for oracle.

230 User oracle logged in.
ftp> ascii
200 Type set to A.
ftp> cd /home/oracle/testdata
250 CWD command successful.
ftp> prompt
Interactive mode Off .
ftp> mget reserveStock.csv inventory.csv
200 PORT command successful.
150 Opening ASCII mode data connection for reserveStock.csv (59584 bytes).
226 Transfer complete.
ftp: 60032 bytes received in 1.13Seconds 53.27Kbytes/sec.
Error opening local file inventory.csv.
> inventory.csv:Permission denied
ftp> bye
221 Goodbye.
0
 
peter_chongAuthor Commented:
Dear EE members,
I know the cause - My application is locking the inventory.csv while the ftp process has not completed.

Can I add file locking condition in batch file, so that
once the files download complete, only other applications can share the csv files.

Extra point will be granted, if this is possible.

Thank you.

Regards,
Peter
0
 
yuzhCommented:
Have a look at this doc:
http://www-05.ibm.com/de/support/ecurep/problems.html
to see if it can help.
0
 
gheistCommented:
You have permission problem in place where you try to save files on XP box. No problem with FTP server or session as such.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now