Search Results

Search found 801 results on 33 pages for 'the bat'.

Page 3/33 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Using Sleep with findstr in a .bat

    - by user270506
    I created a .bat file with the below lines cd C:\MyFolder d: findstr "Apple" C:\log.txt |findstr "red" > red_apples.txt SLEEP 3600 GOTO START When the bat is executed, the SLEEP is not working and the commands are running continously. Is there anything wrong with the code? Please help !

    Read the article

  • How to launch a .bat file in a C# windows Service project

    - by freedark
    I create a C# Windows servive project, then I want to run a .bat file, but I find that it does not run Process pInfo = new Process(); pInfo.StartInfo.UseShellExecute=false; pInfo.StartInfo.CreateNoWindow=true; pInfo.StartInfo.FileName =bat file name ; pInfo.StartInfo.RedirectStandardOutput = true; pInfo.Start(); Could anyone help me ?

    Read the article

  • Creating a .bat file to execute mysql and other commands

    - by BCIT - JD
    I'm looking for a way to reduce the amount of typing I do to check mysql entries and other things. For example, I wanted to create a .bat file that will execute the following commands. mysql -u user -p *enter in the password* USE databasename SELCT * FROM table; The problem is after the initial mysql -u user -p the rest of the commands written down do not get executed. Is it possible to continue running commands after calling something like mysql or other programs, that seem to add its prefix(?) to the beginning of commands (mysql). I'm not very familiar with the terminology so forgive me if it sounds confusing. I'd like to use the same kind of concept for other things as well. Help is much appreciated, Thanks.

    Read the article

  • Converting a .bat executable to Mac

    - by Wes
    I need some help converting a .bat executable file that I run on our PC at my job so that it works on a mac. Before we upload tar files to our website we run this script which to the best of my knowledge simply unlocks all of the permissions to the tar and all the images within. If someone could help me in "translating" it to run on my Mac that would be awesome! I was hoping I could set up something in Automator Here's the code del images5.tar move images4.tar images5.tar move images3.tar images4.tar move images2.tar images3.tar move images.tar images2.tar cd .. tar --mode=777 -rvf images.tar *.jpg tar --mode=777 -rvf images.tar p move images.tar ./tarpics

    Read the article

  • Run a .bat file in a scheduled task without a window

    - by Tom Dunham
    I have a scheduled task that starts a batch script that runs robocopy every hour. Every time it runs a window pops up on the desktop with robocopy's output, which I don't really want to see. I managed to make the window appear minimized by making the scheduled job run cmd /c start /min mybat.bat but that gives me a new command window every hour. I was surprised by this, given cmd /c "Carries out the command specified by string and then terminates" - I must have misunderstood the docs. Is there a way to run a batch script without it popping up a cmd window?

    Read the article

  • PHP / Drupal equivalent of .bat file [closed]

    - by Pamela
    I am new to Drupal and have just started in Drupal 7. I have a very simple .bat file that calls a .txt file to open a ftp connection, get a file off the ftp server and place it on my desktop. Now that I know that works.. (YAY!) I need to figure out how to have it done with a cron job in Drupal, save it somewhere so that I can unzip it somehow and then populate a table in the database with it. Any advice would be greatly appreciated!

    Read the article

  • bat file to disable ethernet adaptor and then reenable it after windows log in

    - by jaslr
    When I log into Windows 7 I need to wait 10 seconds and then disable the Local Area Connection (ethernet adaptor) and then reenable it. I have looked through the suggested answer: Enable/disable wireless interface in a bat file but that seems irrelevant as it just toggles the current state. From what I can tell I need to include: netsh interface set interface "Local Area Connection" DISABLED netsh interface set interface "Local Area Connection" ENABLED but I'm unsure of the wait time or how I can have this start after Windows has successfully logged in. What's the best approach here?

    Read the article

  • Executing bat file and returning the prompt

    - by Lieven Cardoen
    I have a problem with cruisecontrol where an ant scripts executes a bat file that doesn't give me the prompt back. As a result, the project in cruisecontrol keeps on bulding forever until I restart cruisecontrol. How can I resolve this? It's a startup.bat from wowza (Streaming Server) that I'm executing: @echo off call setenv.bat if not %WMSENVOK% == "true" goto end set _WINDOWNAME="Wowza Media Server 2" set _EXESERVER= if "%1"=="newwindow" ( set _EXESERVER=start %_WINDOWNAME% shift ) set CLASSPATH="%WMSAPP_HOME%\bin\wms-bootstrap.jar" rem cacls jmxremote.password /P username:R rem cacls jmxremote.access /P username:R rem NOTE: Here you can configure the JVM's built in JMX interface. rem See the "Server Management Console and Monitoring" chapter rem of the "User's Guide" for more information on how to configure the rem remote JMX interface in the [install-dir]/conf/Server.xml file. set JMXOPTIONS=-Dcom.sun.management.jmxremote=true rem set JMXOPTIONS=%JMXOPTIONS% -Djava.rmi.server.hostname=192.168.1.7 rem set JMXOPTIONS=%JMXOPTIONS% -Dcom.sun.management.jmxremote.port=1099 rem set JMXOPTIONS=%JMXOPTIONS% -Dcom.sun.management.jmxremote.authenticate=false rem set JMXOPTIONS=%JMXOPTIONS% -Dcom.sun.management.jmxremote.ssl=false rem set JMXOPTIONS=%JMXOPTIONS% -Dcom.sun.management.jmxremote.password.file= "%WMSCONFIG_HOME%/conf/jmxremote.password" rem set JMXOPTIONS=%JMXOPTIONS% -Dcom.sun.management.jmxremote.access.file= "%WMSCONFIG_HOME%/conf/jmxremote.access" rem log interceptor com.wowza.wms.logging.LogNotify - see Javadocs for ILogNotify %_EXESERVER% "%_EXECJAVA%" %JAVA_OPTS% %JMXOPTIONS% -Dcom.wowza.wms.AppHome="%WMSAPP_HOME%" -Dcom.wowza.wms.ConfigURL="%WMSCONFIG_URL%" -Dcom.wowza.wms.ConfigHome="%WMSCONFIG_HOME%" -cp %CLASSPATH% com.wowza.wms.bootstrap.Bootstrap start :end

    Read the article

  • Files not waiting for each other

    - by Sunny
    I have two batch files as follows in which file2.bat is dependent on file1.bat's output: file1.bat @ECHO OFF setlocal enabledelayedexpansion SET "keystring1=" ( FOR /f "delims=" %%a IN ( Source.txt ) DO ( ECHO %%a|FIND "Appprocess.exe" >NUL IF NOT ERRORLEVEL 1 SET keystring1=%%a FOR %%b IN (App1 App2 App3 App4 App5 App6 ) DO ( ECHO %%a|FIND "%%b" >NUL IF NOT ERRORLEVEL 1 IF DEFINED keystring1 CALL ECHO(%%keystring1%% %%b&SET "keystring1=" )))>result.txt GOTO :EOF file2.bat @echo off setlocal enabledelayedexpansion (for /f "tokens=1,2" %%a in (memory.txt) do ( for /f "tokens=5" %%c in ('find " %%a " ^< result.txt ') do echo %%c %%b ))> new.txt file1.bat usually takes 60 sec to complete its execution. In master.bat file i am calling above two files as: call file1.bat call file2.bat but file2.bat is not waiting for file1.bat to complete its execution. Even , i tried to call file2.bat within file1.bat as below but still its not waiting for file1.bat to get completed: @ECHO OFF setlocal enabledelayedexpansion SET "keystring1=" ( FOR /f "delims=" %%a IN ( Source.txt ) DO ( ECHO %%a|FIND "HsvDataSource.exe" >NUL IF NOT ERRORLEVEL 1 SET keystring1=%%a FOR %%b IN (EUHFMPROD USHFMPROD TL2TEST GSHFMPROD TL2PROD GSARCH1213 TL2FY13) DO ( ECHO %%a|FIND "%%b" >NUL IF NOT ERRORLEVEL 1 IF DEFINED keystring1 CALL ECHO(%%keystring1%% %%b&SET "keystring1=" )))>file2.txt GOTO :EOF call file1.bat I also tried below start option, but no effect.: start file1.bat /wait call file2.bat Not getting ..why its happening..?

    Read the article

  • Run batch file when argument contains quotes and spaces (from .NET framework)

    - by turtle
    I have a bat file which sets some environment variables, and then executes a command on the command line. I want to replace the hard coded command with one passed in via a parameter. So: :: Set up the required environment SET some_var=a SET another_var=b CALL some.bat :: Now call the command passed into this batch file %1 The problem is that the command is complex, and doesn't escape cleanly. It looks like this: an.exe -p="path with spaces" -t="some text" -f="another path with spaces" I'm trying to call the .bat from a .NET framework app, using: Dim cmd as String = "the cmd" System.Diagnostics.Process.Start( thebat.exe, cmd ) but I can't seem to get the escapes to work correctly. Can someone tell me how the string cmd should be entetered to get the command passed into the bat file as an argument correctly?

    Read the article

  • bat script to delete file older than 7 days

    - by Jessie
    hi guys i have a bat script in which gets all files in a folder and then converts this folder with its contents into a one RAR file. This script also adds the current date once it makes a copy and moves it this file into a backup folder, i am planning to have this bat file run by a windows scheduler task every day. My question is there a way to add into this cript to also delete all rar files older than 7 days in the backup folder? for /f "delims==" %%D in ('DIR D:\scripts /A /B /S') do ( "C:\Program Files\WinRAR\WinRAR.EXE" a -agyyyy-MM-dd -r "c:\backup\scripts.rar" "%%D" )

    Read the article

  • How to run "android.bat sdk" in Window 7

    - by user1730495
    I have downloaded and installed Android SDK and tried to start android.bat sdk but got following exception: C:\products\Android\tools>android.bat sdk Exception in thread "main" java.lang.UnsatisfiedLinkError: no swt-win32-3550 or swt-win32 in swt.library.path, java.library.path or the jar file at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source) at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source) at org.eclipse.swt.internal.C.<clinit>(Unknown Source) at org.eclipse.swt.widgets.Display.<clinit>(Unknown Source) at com.android.sdkmanager.Main.showSdkManagerWindow(Main.java:328) at com.android.sdkmanager.Main.doAction(Main.java:302) at com.android.sdkmanager.Main.run(Main.java:118) at com.android.sdkmanager.Main.main(Main.java:101) I have searched for solution a long time but I cannot get it to work. Is there anything I have to set up first?

    Read the article

  • .BAT Switches Parsing

    - by giiYanJ
    Erm.. I'm working with a switches parsing in BAT files, which goes like this: <commands> -a -b -x -y -z -u abc ...... The user may input a lot of switch, or none. So I used looped shift to make parsing infinite switches possible: :loop IF "%1"=="-a" ... SHIFT GOTO loop But when the script ends, I always get cmd executing the switches and showing up error like '-n' is not recognized as an internal... So, someone got any idea? Thanks a lot... P/S: Make solution sticks with BAT script if possible as using other language may cause dependencies problem as this script is aimed on ANY computer with Windows. Finally, thanks again =) EDIT: Tried shf301 suggestion, i found out that I used DEL %0 to delete itself but it seems the %0 is shifted into the arguments because of the SHIFT command.

    Read the article

  • How to apply %% to a variable in a script with input parameter?

    - by murxx
    Hi, I asked a question yesterday about how to manage to get %% around a variable without getting the evaluation. Well, the thing is, it does not work that way in my case... I have a .bat file which gets an input parameter. Later on I want to use the value of this input parameter and put %...% around, like: call script.bat testValue script.bat: set inputPar=%1 set newValue=%%inputPar%% Now I get: echo %inputPar% testValue echo %newValue% %inputPar% But I would like to get: echo %newValue% %testValue% Is that somehow possible?

    Read the article

  • Use .bat file to recursively loop through folders and get hold of .class files

    - by user320550
    HI all, This is what i'm trying to do. I have a .bat file which takes in a argument which is nothing but a folder name. What i do first is go one level up (cd ..). Now in this directory i have 3 folders and each folders have sub-folders and have .class files in them. What i want to do is recursively loop through the folders and get hold of the .class files. Once this is done i want to echo the target folder of the .class file as well as echo the name of the.class file. So c:\temp\potter\myclass.class. I would echo out c:\temp\potter\ and myclass. I'm able to do this by writing a separate bat file which works. But when i integrate this with the recursive function it seems to break. This is what i'm doing: :: call the junit classes... and save the results echo step 3... cd %1 cd .. for /r %%a in (*.class) do set Var=%%a echo Full file location %Var% for %%i in ("%Var%") do Set CF=%%~dpi Set CF=%CF:~0,-1% :LOOP If "%CF:~-1,1%"=="\" GoTo :DONE Set CF=%CF:~0,-1% GoTo :LOOP :DONE Set CF=%CF:~0,-1% echo Folder Location %CF% ::cd %CF% For %%j in ("%Var%") Do Set name=%%~nxj :: -6 because of Quotations Set name=%name:~0,-6% echo File Name %name% echo step 3 complete... However i only get the output of one directory, while i have multiple directories having .class files. This is the output i get: step 3... Full file location C:\NKCV\Project\MyActivities\6_Selenium\htmlTestCasesConve rted2JUnit\iexplore\flow2\testCase_app2.class Folder Location C:\NKCV\Project\MyActivities\6_Selenium\htmlTestCasesConverte d2JUnit\iexplore\flow2 File Name testCase_app2 step 3 complete... missing argument! usage htmltestCaseLocation for eg., "C:\NKCV\Project\MyActivities\6_Selenium\htmlTestCases" Could anyone please let me know whats wrong here? Thanks.

    Read the article

  • .bat file overriding answer

    - by John Peters
    When I made this batch file, when typing y and n for the first time it works fine, but as soon as I choose n, every single time I try inputting something, it opens up the 7000 songs wpl list then closes it and replaces it with Rick Astley... HELP! @echo off :Ask echo Would you like to listen to the best songs out of the 7000 I have?(Y/N) set INPUT= set /P INPUT=Type input: %=% If /I "%INPUT%"=="y" goto yes If /I "%INPUT%"=="n" goto lolno echo Incorrect input & goto Ask :yes start c:/Users/MyName/Music/Playlists/"The Best of the 7000 songs that I have.wpl" :lolno start c:/Users/MyName/Music/Downloads/Music/"Various Artists"/"The Number One 80's Album Disc 2"/"06 Never Gonna Give You Up.mp3"

    Read the article

  • error: Unable to find vcvarsall.bat

    - by okada
    Hello. I'm trying to install dulwich for bzr-git. now, I use Python 2.6 based bazaar. (I use msys.) My steps are as follows: $ bzr branch lp:dulwich $ cd dulwich/ $ python setup.py install running install running build running build_py creating build : : creating build\lib.win32-2.6\dulwich\tests : : running build_ext building 'dulwich._objects' extension error: Unable to find vcvarsall.bat If you know any hints, tell me please. Thanks. Okada.

    Read the article

  • bat cmd or vb script to move specific files from one location to another location

    - by Praveen
    can someone help me with a bat cmd to move specific files from one location to another location my file structure Source location E:\Test1\2011\18\5730547\5730552\html E:\Test1\2011\18\5730547\6430552\html E:\Test1\2011\38\7730140\2330582\html E:\Test1\2011\19\5718547\5730552\html wherein html folder contains css folder, xml and html files. I want to move only file name contains testcase.html and images.html files from the above location to below location Required location E:\Final1\2011\18\5730547\5730552\html E:\Final1\2011\18\5730547\6430552\html E:\Final1\2011\38\7730140\2330582\html E:\Final1\2011\19\5718547\5730552\html Please help me

    Read the article

  • converting bash script to .bat

    - by Robokop
    #!/bin/bash function usage(){ cat <<EOF USAGE: $0 [strategylist] valid strategies are: ALLD ALLC TitForTat JOSS WeightedRandom Tester EOF exit 1 } [ -z $1 ] && usage javac robsAgents/*.java robsAgents/behaviours/*.java agentlist='leader:robsAgents.TournamentLeader' agentlist=$agentlist";$1:robsAgents.Contestant" while shift; do agentlist=$agentlist";$1:robsAgents.Contestant" done java jade.Boot -gui -host 127.0.0.1 "$agentlist" i have above bash script and have no access to a windows computer and i need to convert it to a .bat file, but don't even know how to do the shift and argument parsing

    Read the article

  • .bat for shutdown/reboot on xp loop problem

    - by Luca
    hello! i have a little problem... on win xp, if i write on commandline shutdown -t 00 -r -f the reboot works fine. but if i paste it, as is, in a bat file...the prompt show me an infinite loop. anyone can say me why? thanks a lot for any suggestion :)

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >