|
Answer» Why do you have TWO COLONS before your output file name? Code: [Select]echo ^<a href="!var2!\%%~nxa.html"^>%%~nxa.html^</a^>^<br^> >> :: "%~dp0\index.html"doing this in notepad. word-rap. my bag. i fixed it.
echo ^%%~nxa.html^^ >> :: "%~dp0\index.html"
ran and re-tested it.
in the consul i get. "Maximum set local recursion level reached." repeatedly
you did it. index.html show's 1i.html[/url] Code: [Select]setlocal enabledelayedexpansion set "var1=%%~a" set "var2=!var1:*All-Games=!" echo ^<a href="!var2!\%%~nxa.html"^>%%~nxa.html^</a^>^<br^> >> "%~dp0\index.html" endlocali i think you did it. while its on my usb hard drive it works FINE.
but the instant i move it to my virtual box and server it it uses the full path. example. i know i didn't give you all my info so harm done.
1i.html[/url]
but i guess i will server it off my usb and keep LEARNING about batch files some more. thank you.
SquashmanThis part of the code is what is cutting down the Directory Path. Code: [Select]set "var2=!var1:*All-Games=!"It matches on a Wildcard and the phrase All-Games and removes it. So if %%A = G:\flashgames\flashgames batch test\All-Games\games\1i\1i.html Var2 = \games\1i\1i.html because it matches: G:\flashgames\flashgames batch test\All-Games and removes it from the path.
On your Server the All-Games Folder is not in your path. You have now changed the requirements for your batch file. You would now have to match on flashgames instead of All-Games.
I predict 5 pages...Quote from: snowcatman on March 31, 2014, 11:18:56 AM i know i didn't give you all my info
That's the problem and it applies to so many people asking questions, not only you: if you don't give accurate details then you often get code that doesn't work in your real life situation, and in the worst case it will destroy files.
You supplied few actual details so the code you got WORKED for what you stated, but what you wanted was DIFFERENT again.
Quote from: patio on March 31, 2014, 01:29:56 PMI predict 5 pages...
|