From: James on
This might be a dumb question but, I can't find a simple answer anywhere. Is there a way via a bat or cmd (even vbs) to:

1) auto logon to a FTP server
2) do an "xcopy" from a ftp server to one directory on the local drive
3) auto logoff and close the ftp session

I don't need the folders. I just need all of the files that are in separate folders to be placed in one folder locally. Finally, is there a way to skip files that are already on local drive so they do not get re-written?

Thanks in advance,

James
From: Pegasus (MVP) on

"James" <jbrister(a)kennerpd.com> wrote in message
news:eTDCtsWhJHA.3728(a)TK2MSFTNGP06.phx.gbl...
This might be a dumb question but, I can't find a simple answer anywhere.
Is there a way via a bat or cmd (even vbs) to:

1) auto logon to a FTP server
2) do an "xcopy" from a ftp server to one directory on the local drive
3) auto logoff and close the ftp session

I don't need the folders. I just need all of the files that are in separate
folders to be placed in one folder locally. Finally, is there a way to skip
files that are already on local drive so they do not get re-written?

Thanks in advance,

James

================

Here is a batch file that will download multiple files:
@echo off
set script="%temp%\Script.scr"
set site=ftp.mysite.com
set user=JoeDoe
set password=johnny
echo> %Script% %user%
echo>> %Script% %password%
echo>> %Script% cd test
echo>> %Script% binary
echo>> %Script% prompt off
echo>> %Script% mget *.*
echo>> %Script% quit
ftp -s:%Script% %site%
del %Script%

The version of ftp.exe that comes with Windows is quite limited. If you need
something a little fancier then perhaps wget.exe
(http://www.interlog.com/~tcharron/wgetwin.html) is your tool. Its -nc
(no_clobber) switch prevents pre-existing files from getting downloaded
again.


From: Al Dunbar on
If you are looking for batch solutions, please post them at microsoft.public.win2000.cmdprompt.admin or microsoft.public.windows.server.scripting, where such questions are more on-topic than here in the vbscript newsgroup.

/Al
"James" <jbrister(a)kennerpd.com> wrote in message news:eTDCtsWhJHA.3728(a)TK2MSFTNGP06.phx.gbl...
This might be a dumb question but, I can't find a simple answer anywhere. Is there a way via a bat or cmd (even vbs) to:

1) auto logon to a FTP server
2) do an "xcopy" from a ftp server to one directory on the local drive
3) auto logoff and close the ftp session

I don't need the folders. I just need all of the files that are in separate folders to be placed in one folder locally. Finally, is there a way to skip files that are already on local drive so they do not get re-written?

Thanks in advance,

James
From: Todd Vargo on
OP included "(even vbs)", so it would be appropriate to provide a vbs equivalent solution along with your topicality redirection.
"Al Dunbar" <alandrub(a)hotmail.com> wrote in message news:eHWvua0hJHA.6128(a)TK2MSFTNGP02.phx.gbl...
If you are looking for batch solutions, please post them at microsoft.public.win2000.cmdprompt.admin or microsoft.public.windows.server.scripting, where such questions are more on-topic than here in the vbscript newsgroup.

/Al
"James" <jbrister(a)kennerpd.com> wrote in message news:eTDCtsWhJHA.3728(a)TK2MSFTNGP06.phx.gbl...
This might be a dumb question but, I can't find a simple answer anywhere. Is there a way via a bat or cmd (even vbs) to:

1) auto logon to a FTP server
2) do an "xcopy" from a ftp server to one directory on the local drive
3) auto logoff and close the ftp session

I don't need the folders. I just need all of the files that are in separate folders to be placed in one folder locally. Finally, is there a way to skip files that are already on local drive so they do not get re-written?

Thanks in advance,

James
From: Al Dunbar on
That makes three of us that failed to provide the OP a vbs solution, so I'm not sure of the reason for your complaint. When I replied I had already seen that Pegasus had provided the batch solution that the OP was primarily interested in. On balance I feel that our combined response has been basically constructive - unless, of course, you feel that we should be giving batch advice here.

If there is a perception that providing a vbscript solution is a prerequisite for providing navigational advice, then perhaps we should consider "vbscrpt" as a generic term meaning "whatever scripting methodology you can't find a newsgroup for...

/Al

"Todd Vargo" <tlvargo(a)sbcglobal.netz> wrote in message news:u4aSBp0hJHA.2384(a)TK2MSFTNGP04.phx.gbl...
OP included "(even vbs)", so it would be appropriate to provide a vbs equivalent solution along with your topicality redirection.
"Al Dunbar" <alandrub(a)hotmail.com> wrote in message news:eHWvua0hJHA.6128(a)TK2MSFTNGP02.phx.gbl...
If you are looking for batch solutions, please post them at microsoft.public.win2000.cmdprompt.admin or microsoft.public.windows.server.scripting, where such questions are more on-topic than here in the vbscript newsgroup.

/Al
"James" <jbrister(a)kennerpd.com> wrote in message news:eTDCtsWhJHA.3728(a)TK2MSFTNGP06.phx.gbl...
This might be a dumb question but, I can't find a simple answer anywhere. Is there a way via a bat or cmd (even vbs) to:

1) auto logon to a FTP server
2) do an "xcopy" from a ftp server to one directory on the local drive
3) auto logoff and close the ftp session

I don't need the folders. I just need all of the files that are in separate folders to be placed in one folder locally. Finally, is there a way to skip files that are already on local drive so they do not get re-written?

Thanks in advance,

James