HTTrack Website Copier
Free software offline browser - FORUM
Subject: Re: Multiple Versions (Dates) of the Same Website
Author: William Roeder
Date: 03/27/2010 15:10
 
> William, I somewhat understand what you are asking
> of me, and I have attempted to reconcile the syntax,
> but to no avail.
> 
> This is my failed attempt:
> FOR /R "C:\\Users\\Jerry Lee\\Desktop\\test\\ESE 211" %G (.) 
> DO (
>   md "C:\\Users\\Jerry Lee\\Desktop\\test\\dogs"
>   fsutil hardlink create . *
>
> )
> 
> The source HTTrack project is ESE 211; I captured
> the mirror for this website and copied over the
> project itself (.whtt) and the directory containing
> all of the website files (this directory is called
> "ESE 211").  I believe you want me to utilize a for
> loop within the batch file to recursively put
> hard-linked files in a new directory of my choosing,
> here called "dogs".  Surely my syntax is off in some
> way; any suggestions would be much appreciated.

Somewhat close. To do it in one pass you'll need delayed expansion.

setlocal enableDelayedExpansion||exit/b
FOR /R "C:\\Users\\Jerry Lee\\Desktop\\test\\ESE 211" %%G (.) DO (
  set fromFile="%%~G"
  set fromDir="%%~dpG"
  md !fromDir:\\ESE 211=\\dogs! 2>nul
  fsutil hardlink create !fromFile:\\ESE 211=\\dogs! "%%~G"
)
 
Reply Create subthread


All articles

Subject Author Date
Multiple Versions (Dates) of the Same Website

03/23/2010 23:30
Re: Multiple Versions (Dates) of the Same Website

03/24/2010 21:04
Re: Multiple Versions (Dates) of the Same Website

03/26/2010 22:49
Re: Multiple Versions (Dates) of the Same Website

03/27/2010 15:10
Re: Multiple Versions (Dates) of the Same Website

03/27/2010 15:11




4

Created with FORUM 2.0.11