tags:

views:

25

answers:

0

Hi. I hope that this is the right place to ask this question: if I'm wrong, just tell me to shut up. :)

I'm a Windows wget user. I want to mirror a site that has a lot of files in just one big directory (no subdirectories): e.g.
aaa.htm
aab.htm
aba.htm
bcd.htm
etc.

Now, I'd like wget automatically putting the files it downloads in custom subdirectories based on the first letters of the filenames: e.g.
C:\a\aa\aaa.htm
C:\a\aa\aab.htm
C:\a\ab\aba.htm
C:\b\bc\bcd.htm
etc.

Is it possible? If so, how?

(The reason why I'd like wget doing it while it downloads (instead of a batch doing it after the download has been completed) is that this way it could change the internal links: in fact, if in aaa.htm there is a link to bcd.htm, the link would be rewritten as C:\b\bc\bcd.htm .)

Thanks a lot in advance.