Greetings, I need to able to always download files from a remote directory to a given local directory, without building a hierarchy of remote directories locally. For instance, I want to recursively copy files from 'host/dir' to 'c:\temp\dir' so that files from 'host\dir' will be downloaded into 'c:\temp\dir', not into 'c:\temp\dir\host\dir'. I know that it can be done by using 'nH' and '--cut-dirs' :
wget -r -nH --cut-dirs=1 -P c:\temp\dir ftp://host/dir However, if the source path is 'host/dir1/dir2', I'd need to use '--cut-dirs=2'. And so on. It would be nice if I could say '--cut-dirs=-1' or something else so that the last remote directory is always used. That would be useful if you use a batch script and you don't now beforehand how many levels there would be in the remote path. I tried setting '--cut-dirs=100' (a number larger that any number of levels I have) but that seems to only transfer the main remote directory, not its subdirectories (thus losing recursive behavior). Is such "dynamic" setting for '--cut-dirs' possible? Thank you. ______________________________________________________ Click here to donate to the Hurricane Katrina relief effort. http://store.yahoo.com/redcross-donate3/
