Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Automatic editing of a batch file?

Featured Replies

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.

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!

  • Author

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
\etc

The 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.

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.

  • Author

Most of the build.bat's follow roughly this idea...

@ECHO OFF

ECHO ------------------------------
ECHO Creating Build Folder
rmdir BUILD /S /Q
md BUILD

ECHO ------------------------------
ECHO Building Directory...
xcopy "a" "BUILD\test4\a" /E /Q /I /Y
xcopy "b" "BUILD\test4\b" /E /Q /I /Y
xcopy "c" "BUILD\test4\c" /E /Q /I /Y
xcopy "d" "BUILD\test4\d" /E /Q /I /Y
xcopy "*.xml" "BUILD\test4\" /Q /I /Y
xcopy "*.txt" "BUILD" /Q /I /Y

ECHO ------------------------------
ECHO Removing SVN directories from build...
FOR /R BUILD %%d IN (SVN) DO @RD /S /Q "%%d" 2>NUL

ECHO Build Complete - Scroll Up to check for errors.
ECHO Final build is located in the BUILD directory
ECHO Enjoy!!!

pause

Hope that helps

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.