Thursday, June 18, 2009

create and share a folder with .bat file

Simple .bat file to create a folder and share that folder with full permission and give access to Everyone. Just put below four lines of code into any textpad save a .bat file.


Md E:\MyFolder
Net Share MyShare=E:\MyFolder
Cacls E:\MyFolder /e /r Everyone
Cacls E:\MyFolder /e /g Everyone:C