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
If you need files in sub-directories (as you mention “all files from my ftp server”, not “all files in a given directory/folder”) you need a tool similar to (or exactly) like this http://users.ugent.be/~bpuype/wget/ (which is a windows FTP command line tool that can handle subdirectories easily)
Don’t know about changing permissions, FTP is not aimed at that goal, BUT, by means of using GET and PUT, maybe you can (re)set permissions in a particular way. The CHMOD commands can only be run in TELNET, not FTP … or somebody may have thought about that, and written an FTP tool with that feature …