Ok,
This is beyond my scripting skills - from a windows network I connect to a unix box, I then put files on the unix box. All is fine however, the pdf file are quite large and do not change often, so the *.pdf call is not very efficient. I would like transfer only the new pdf files in the pdf directory. The other directories are just fine.
Can someone please help? Ill buy you a burger...
----------------------------------------------------
account
password
prompt ;toggle confirmation prompting to off
cd /filepathwhereallthepdssare/ ;change to desired remote directory
ascii
mput \\filepath\Web\*.html ; this is fine - small overhead
bin
mput \\filepath\*.pdf ;this is where there are just too many files to copy.
bye ;quit the FTP program
FTP - Put new files only
Moderator: DosItHelp
-
- Expert
- Posts: 391
- Joined: 19 Mar 2009 08:47
- Location: Iowa
-
- Posts: 319
- Joined: 12 May 2006 01:13
you can download [url "http://gnuwin32.sourceforge.net/packages/findutils.htm"]findutils from GNU[/url], then use the find command.
first you create a dummy file, say we call it dummy.txt. then issue this command
the find command will find the pdf files that are newer than the dummy.txt file. this way you get the newest pdf in that directory. using for loop, which i am sure you know how to do already since you are a windows guy, put each file into destination unix server.
first you create a dummy file, say we call it dummy.txt. then issue this command
Code: Select all
for .... ( find_gnu.exe /localpath -type f -name "*.pdf" -newer dummy.txt ) do (
rem do your ftp
)
the find command will find the pdf files that are newer than the dummy.txt file. this way you get the newest pdf in that directory. using for loop, which i am sure you know how to do already since you are a windows guy, put each file into destination unix server.