Post-build event command line

用ASCX做Webpart,工程编辑后直接Copy到指定目录。

 

dir C:\Inetpub\wwwroot\wss\VirtualDirectories\80\wpresources\ | find "WebIT"   
if %errorlevel%==0 goto hasFolder        REM--如果有就跳到:ok
if %errorlevel%==1 goto CreateFolder       REM--如果没就跳到:end
:CreateFolder
md C:\Inetpub\wwwroot\wss\VirtualDirectories\80\wpresources\WebIT
:hasFolder
copy "$(TargetDir)*.dll" C:\Inetpub\wwwroot\wss\VirtualDirectories\80\bin
copy "$(ProjectDir)\UserControl\*.ascx" C:\Inetpub\wwwroot\wss\VirtualDirectories\80\wpresources\WebIT
dir C:\Inetpub\wwwroot\wss\VirtualDirectories\8000\wpresources\ | find "WebIT"   
if %errorlevel%==0 goto hasFolder2        REM--如果有就跳到:ok
if %errorlevel%==1 goto CreateFolder2       REM--如果没就跳到:end
:CreateFolder2
md C:\Inetpub\wwwroot\wss\VirtualDirectories\8000\wpresources\WebIT
:hasFolder2
copy "$(TargetDir)*.dll" C:\Inetpub\wwwroot\wss\VirtualDirectories\8000\bin
copy "$(ProjectDir)\UserControl\*.ascx" C:\Inetpub\wwwroot\wss\VirtualDirectories\8000\wpresources\WebIT

你可能感兴趣的:(command)