|
server
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Deployment to multiple folders with RobocopyI need to deploy an ASP.NET application to multiple folders in IIS,
the application is a template with different parameters for each site set in web.config. I'm trying to create a script with Robocopy that would look at all directories in IIS and if a directory meets certain criteria (has a specific file in it to make sure that this is the required application folder) then copy files into it overwriting all the contents. I can't really work out how to do it in Robocopy that does look like a good tool though so any advice much appreciated! "masterslave" <ocb***@gmail.com> wrote in message You need to wrap robocopy into a batch file that looks into the various news:9ef29e98-f569-49aa-b54e-2b60857ff3c2@y10g2000prf.googlegroups.com... >I need to deploy an ASP.NET application to multiple folders in IIS, > the application is a template with different parameters for each site > set in web.config. I'm trying to create a script with Robocopy that > would look at all directories in IIS and if a directory meets certain > criteria (has a specific file in it to make sure that this is the > required application folder) then copy files into it overwriting all > the contents. > > I can't really work out how to do it in Robocopy that does look like a > good tool though so any advice much appreciated! folders. If you post specific details about folder names, file names and your criteria then someone will suggest a suitable solution. masterslave wrote:
> I need to deploy an ASP.NET application to multiple folders in IIS, Need more details. Are you looking to have a script that is part of a> the application is a template with different parameters for each site > set in web.config. I'm trying to create a script with Robocopy that > would look at all directories in IIS and if a directory meets certain > criteria (has a specific file in it to make sure that this is the > required application folder) then copy files into it overwriting all > the contents. > > I can't really work out how to do it in Robocopy that does look like a > good tool though so any advice much appreciated! web page or that will run as a scheduled task? Basics of what you are looking for are simple. Something like this: [code] Dim objFSO, WshShell Set objFSO = CreateObject("Scripting.FileSystemObject") Set WshShell = CreateObject("wscript.Shell") Set objFolder = objFSO.GetFolder("C:\InetPub\WWWRoot") For Each sFolder In objFolder.SubFolders If objFSO.FileExists(sFolder.Path & "\TestFile.txt") Then WshShell.Run("CMD.EXE /C ROBOCOPY SourceDir " & sFolder.Path & "\ /MIR") End If Next [/code] Hope that helps, Mark D. MacLachlan -- Thanks for the replies, guys! I would like to look at every folder
inside C:\Inetpub\wwwroot and if a folder contains a file called PriceComparison.aspx then it is the folder I'm looking for and would like to overwrite it with the contents of the folder D:\Temp\OclCommerce. I'm looking for running the script on ad hoc basis, for updates - running a batch file would suit the purpose perfectly! Show quoteHide quote On Jul 9, 6:23 pm, "Mark D. MacLachlan" <markd***@live.com> wrote: > masterslave wrote: > > I need to deploy an ASP.NET application to multiple folders in IIS, > > the application is a template with different parameters for each site > > set in web.config. I'm trying to create a script with Robocopy that > > would look at all directories in IIS and if a directory meets certain > > criteria (has a specific file in it to make sure that this is the > > required application folder) then copy files into it overwriting all > > the contents. > > > I can't really work out how to do it in Robocopy that does look like a > > good tool though so any advice much appreciated! > > Need more details. Are you looking to have a script that is part of a > web page or that will run as a scheduled task? > > Basics of what you are looking for are simple. Something like this: > > [code] > Dim objFSO, WshShell > Set objFSO = CreateObject("Scripting.FileSystemObject") > Set WshShell = CreateObject("wscript.Shell") > > Set objFolder = objFSO.GetFolder("C:\InetPub\WWWRoot") > > For Each sFolder In objFolder.SubFolders > If objFSO.FileExists(sFolder.Path & "\TestFile.txt") Then > WshShell.Run("CMD.EXE /C ROBOCOPY SourceDir " & sFolder.Path & "\ > /MIR") > End If > Next > [/code] > > Hope that helps, > > Mark D. MacLachlan > > --
how to find users with the checkmark on allow to logon to terminal servers
Delete Folders using WMI Scripting Language DNS suffix search list... Robocopy - not providing destination in log output WMI & Eventlogs DISC SPACE How to make goto when nowhere to go ? Script to Rename Computer Name in Domain grab a String (server name) from log |
|||||||||||||||||||||||