Archigos Posted May 22, 2008 Share Posted May 22, 2008 I use a lot of SVN directories for a project and thankfully each one has it's own "build.bat". What I'm trying to do is find a way to automate calling a bunch of these. The problem I'm coming across is that they each have a "pause" at the end of the file so you can view errors before it closes. I wrote up my own batch files that handles running all the needed batches and moving the results where they need to be, but I keep forgetting to sit around and watch it, so half the time I come back and it's sitting on like the second or third one waiting for me to hit a key, then I have to wait longer since it needed the input.I know enough about PowerShell to get around with the variables and the basics, but I figured using that would give me more control of the resulting files. So what I want to accomplish is making a copy of the build.bat (in case it's updated it doesn't get broke) that is missing the pause at the end of the file.The part I need help with is either the ability to remove all the pause commands from the runme.bat (copy of build.bat) or a way to inject all the information from build.bat (minus the pause commands) into a runme.bat.Any help would be greatly appreciated. Link to comment Share on other sites More sharing options...
Yzöwl Posted May 22, 2008 Share Posted May 22, 2008 We're going to need a lot more information, the layout, (and probably content due to poison characters), of the build.bat files for a start! Link to comment Share on other sites More sharing options...
Archigos Posted May 22, 2008 Author Share Posted May 22, 2008 The main layout is this:X:\ \BatchFiles (Where I'm running the PowerShell and batch scripts) \Build (Where all the finished stuff goes) \SVN \Project \1 \2 \etcThe individual Build.bat's are in the directories 1,2,etc... (I think there's like 12 total)Not exactly sure what you mean by poison characters, but the batch files mainly just move crap around and remove the .svn directories... they also call an internal image compressor. I guess if I had to I could just move the crap around via the main PS script instead of calling all the build.bat's but I wanted to do it that way in case they change something on me. Link to comment Share on other sites More sharing options...
Yzöwl Posted May 23, 2008 Share Posted May 23, 2008 If you're wanting a dynamic 'copy without pause' whatever performs that task needs to be able to read and write a file containing characters which would be problematic to reproduce due to them having special meanings.What would be needed therefore is one or more example build.bat files in order to choose an appropriate method, tool or language for performing the task. Link to comment Share on other sites More sharing options...
Archigos Posted May 23, 2008 Author Share Posted May 23, 2008 Most of the build.bat's follow roughly this idea...@ECHO OFFECHO ------------------------------ECHO Creating Build Folderrmdir BUILD /S /Qmd BUILDECHO ------------------------------ECHO Building Directory...xcopy "a" "BUILD\test4\a" /E /Q /I /Yxcopy "b" "BUILD\test4\b" /E /Q /I /Yxcopy "c" "BUILD\test4\c" /E /Q /I /Yxcopy "d" "BUILD\test4\d" /E /Q /I /Yxcopy "*.xml" "BUILD\test4\" /Q /I /Yxcopy "*.txt" "BUILD" /Q /I /YECHO ------------------------------ECHO Removing SVN directories from build...FOR /R BUILD %%d IN (SVN) DO @RD /S /Q "%%d" 2>NULECHO Build Complete - Scroll Up to check for errors.ECHO Final build is located in the BUILD directoryECHO Enjoy!!!pauseHope that helps Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now