Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

bkiesz

Re: Synchronize option creating empty directories

Ahhh... Very cool.. I will go down that route and see where it takes me!! Thanks for your help; really appreciate it

Barry
bkiesz

Re: Synchronize option creating empty directories

Bummer!!

If I can't use the Synchronize feature, how about using the get with wildcards, and time pattern matches, etc.. The issue I'm running into there is that if I set my time pattern for say 3 days and then have it run every day, it'll obviously detect the duplicate. How can I skip this duplicate (answer No) and continue downloading new files? I tried the Option Confirm Off, but it just errors the scripts and stops after the first duplicate file.

I appreciate your help on this!!!
Barry

# Automatically abort script on errors 
option batch on
# Disable overwrite confirmations that conflict with the previous
option confirm off
#Get Script
# Connect using a password
open ftp://user:***@host.com
# Change remote directory
cd /home/user/private/files
# Force binary mode transfer
option transfer binary
# Download file to the local directory K:\
get file1*.*>3D k:\files
get file3*.*>3D k:\files
# Disconnect
close
exit
martin

Re: Synchronize option creating empty directories

There's no way to do what you ask for, except for manually listing the folders in exclude mask.

Edit 2023: It's now possible, see below.
bkiesz

Synchronize option creating empty directories

I've been looking through the forums, docs, etc for a while now and I'm stumped..

What I'm trying to do basically copy files from my FTP server that are new. But knowing that my internet connection might not be as reliable as it should be, instead of setting my -filemask to 1day, I want to set it to 3 days, but not overwrite a file if it has already been downloaded. I just can't make that happen using 'get' and the time pattern options, etc. SO.. after scouring the forums, I found out that the 'synchronize' parameter would work; and it does except that while it doesn't download the files the that are already present within the -filemask time parameter, it still creates the folder structure. I end up with a bunch of empty folders that I don't want. Is there a way around this?

Ideally I would like to use the get with a file wildcard and time pattern. This is partly due to the fact that I have a number of files that I do not necessarily want to Synchronize..

Hopefully someone can shed some light on this for me.

Here's a snippet of my scripts
Barry
# Automatically abort script on errors
option batch on
 
# Disable overwrite confirmations that conflict with the previous
option confirm off
 
#Get Script
# Connect using a password
open ftp://user:***@host.com
 
# Change remote directory
cd /home/user/private/files
# Force binary mode transfer
option transfer binary
# Download file to the local directory K:\
get  file1*.*>2H k:\files
get  file3*.*>2H k:\files
# Disconnect
close
exit

#Synchronize script
# Automatically abort script on errors
option batch abort
# Disable overwrite confirmations that conflict with the previous
option confirm off
# Connect using a password
open ftp://user:xxxxx@host.com
 
# Change remote directory
cd /home/user/private/files
# Force binary mode transfer
option transfer binary
# Download file to the local directory K:\
synchronize -filemask=*.*>1D local K:\sync
# Disconnect
close