Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Name: Mechanix2Go
If the site holds zip[s] named DYYMMDD.zip, this will get the latest one.
::==
@echo off > mydir.ftp
setLocal EnableDelayedExpansion>> mydir.ftp echo o mysite.com
>> mydir.ftp echo username
>> mydir.ftp echo password
>> mydir.ftp echo cd mysite.com
>> mydir.ftp echo ls D*.zip
>> mydir.ftp echo byeftp -s:mydir.ftp > mydir.txt
for /f "tokens=* delims= " %%a in ('find ".zip" ^< mydir.txt ^| find /v "ls D*.zip" ^| sort') do (
set str=%%a
set latest=!str:~0,-1!
)> getzip.ftp echo o mysite.com
>> getzip.ftp echo username
>> getzip.ftp echo password
>> getzip.ftp echo cd mysite.com
>> getzip.ftp echo bin
>> getzip.ftp echo get !latest!
>> getzip.ftp echo byeftp -s:getzip.ftp
::==
=====================================
If at first you don't succeed, you're about average.M2

![]() |
I need help
|
Batch file for renaming f...
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |