Forum Moderators: phranque

Message Too Old, No Replies

Batch File Download From Ftp By Filetype

         

simonstaton

10:58 am on Feb 18, 2010 (gmt 0)

10+ Year Member



Hi,

I am trying to make a batch file that downloads all files from my ftp server not by there filename but by there file type. The file type I need it to download is .occ and .ord

This is the code I have that can download from ftp by a filename:

::---Start download.cmd---
@echo off
setlocal

::Variables
set f=%temp%\ftpc.txt

::Compose ftp commands file
echo open HOST>>%f%
echo user USER PWD>>%f%
echo binary>>%f%
echo cd /htdocs/acatalog>>%f%
echo get FILENAME>>%f%
echo bye>>%f%

::Execute ftp command
::Use "-d" key for verbose output
ftp -n -d -s:%f%

::Cleanup
del /f /q %f%
endlocal
::---End download.cmd---

also while I am posting on here, Does anyone know of a way to change file permissions on my server through a batch file.

Simon

phranque

1:45 pm on Feb 18, 2010 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



welcome to WebmasterWorld [webmasterworld.com], simonstaton!

try adding these commands:
prompt
mget *.occ
mget *.ord

simonstaton

1:52 pm on Feb 18, 2010 (gmt 0)

10+ Year Member



thanks SOLVED!