一个批处理文件

功能:建立5个文件夹,设置共享,设置权限。

@Echo Off
set TEMP=c:\FaxFolder\
md %TEMP%DestFax
md %TEMP%SourFax
md %TEMP%ExceptionPdf
md %TEMP%ReceiverPdf
md %TEMP%Template
net share DestFax=%TEMP%DestFax /grant:everyone,full
net share SourFax=%TEMP%SourFax /grant:everyone,full
net share ExceptionPdf=%TEMP%ExceptionPdf /grant:everyone,full
net share ReceiverPdf=%TEMP%ReceiverPdf /grant:everyone,full
net share Template=%TEMP%Template /grant:everyone,full
echo y|cacls %TEMP%DestFax /T /G everyone:F
echo y|cacls %TEMP%SourFax /T /G everyone:F
echo y|cacls %TEMP%ExceptionPdf /T /G everyone:F
echo y|cacls %TEMP%ReceiverPdf /T /G everyone:F
echo y|cacls %TEMP%Template /T /G everyone:F

取消共享

@Echo Off
net share DestFax /del
net share SourFax /del
net share ExceptionPdf /del
net share ReceiverPdf /del
net share Template /del

posted on 2007-11-21 16:21  catvi  阅读(275)  评论(0编辑  收藏  举报

导航