OK, Many thanks to everyone who posted. From those and from pieces here and there I finally got this thing to fly.
The finish touches are probably easy. But I have been out of sort for the past week or so and this is still eluding me
The final mash-up of all the codes resulted in this one batch file. It does work! For that I am thankful.
There are only two small places where I need to accomplish the finishing touches to a one-click solution. I have tried a few things but in most cases I seem to be ending up will errors in creation for some reason.
Below is the working code with the two sections where I am trying to accomplish the tasks I wrote in at those points in ALL CAPS after a ##
@echo off
:: timestamp YYYY-MM-DD_HH-MM-SS
for /f "delims=" %%a in ('wmic OS Get localdatetime ^| find "."') do set dt=%%a
set dt=%dt:~0,4%-%dt:~4,2%-%dt:~6,2%_%
setlocal
set currentLevel=0
set maxLevel=%2
if not defined maxLevel set maxLevel=2
:procFolder
pushd %1 2>nul || exit /b
if %currentLevel% lss %maxLevel% (
for /d %%F in (*) do (
echo %%~fF >>c:\activelink\activelink-%dt%.txt
set /a currentLevel+=1
call :procFolder "%%F"
set /a currentLevel-=1
)
)
popd
:: start next
Set "InputFile=c:\activelink\activelink-%dt%.txt"
Set "OutputFile=c:\active-link\active-link-%dt%.txt"
setLocal EnableDelayedExpansion > "%OutputFile%"
for /f "usebackq tokens=* delims= " %%a in ("%InputFile%") do (
set s=%%a
>> "%OutputFile%" echo.!s:~59!
)
## AT THIS POINT I WOULD LIKE TO ADD 15 SPACES BEFORE CONTENTS OF THE LINE.
LINES WITHOUT A "\" AT THIS POINT ARE THE NAME OF THE OWNER OF THE FOLLOWING LINES )
(for /f "delims=" %%L in (c:\active-link\active-link-%dt%.txt) do @echo
http://www.mysite.com/%%L)> c:\active-link\active-link-A-%dt%.txt
"C:\fnr.exe" --cl --dir "C:\active-link" --fileMask "active-link-A-%dt%.txt" --excludeFileMask "*.dll,
*.exe" --find "\\" --replace "/"
This is probably an ESS (Extremely Sloppy Script) but it gets the job done.
Any suggestions on shortening appreciated. The FNR.EXE utility was very helpful and 4WD's coding I borrowed from anywhere I could get it to work on my directory structure.
The only two tasks left could really be done with a text editor (And that is what I am doing at this time) but.. as always
Repetitive tasks are best left to the computer.