Batch file fore creating base HTML files & folders -


i'm trying create batch file create basic files & folders website, e.g. css folder, image folder, javascript folder, style.css, index.html. have script setup follows

md css md js md img echo  ^<!doctype html^>^<html lang="en"^>^<head^>^<meta charset="utf-8"^>^<title^>^document^</title^>^</head^>^<body^>^</body^>^</html^>  >>  index.html echo  >>style.css 

as can see, want input basic html starter text within html file, does, in straight line. while isn't end of world, nice if format text proper html indents , line breaks.

one more thing, possible make batch file put css file in css folder? bit of n00b, gentle :0)

thanks!

update here code did upon reading response @endoro

md css md js md img echo  ^<!doctype html^> echo  ^<html lang="en"^> echo  ^<head^> echo ^ <meta charset="utf-8"^> echo  ^<title^> echo  ^</title^> echo  ^</head^> echo  ^<body^> echo  ^</body^> echo  ^</html^> >> index.html echo  >>css\style.css 

it kind of works in puts css file in css folder, when open html file, present is

</html> 

did miss something?

i don't know, indents need, can edit code yourself:

@echo off &setlocal md css 2>nul md js 2>nul md img 2>nul ( echo(^<!doctype html^>^<html lang="en"^> echo(   ^<head^>^<meta charset="utf-8"^> echo(       ^<title^>^document^</title^> echo(   ^</head^> echo(   ^<body^>^</body^>^</html^> )>index.html echo(>css\style.css 

Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -