Search Results

Search found 2598 results on 104 pages for 'smack my batch up'.

Page 7/104 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Free batch image watermarking software

    - by Blade
    Hi everyone. I'm looking for a simple yet effective software to watermark a lot of photos in batch. I have to apply a transparent png watermark image on 400 photos. The program have to place the watermark at a custom position relative to the bottom right corner of every picture. I would have done this in photoshop, but the scriptable action doesn't allow me to do conditionnal placing if the photo is portrait or landscape. I'm looking for a free lightweigh program. Thank you !

    Read the article

  • Batch file to open multiple cmd prompts

    - by JHarris
    I am trying to write a batch file that will automate the following manual process: Open a new cmd prompt (prompt1) Run a bat file (b1) Run a program (that will continue to run) Minimize prompt1 Open a new cmd prompt (prompt2) Run a bat file (b1) Run a different program (that will continue to run) Minimize prompt2 I've found ways to open multiple instances of cmd to run different things, but after I've run the first thing (b1), I then need to run a program in that same cmd window. I currently have start /min cmd /k C:\Users\db2admin\python_environment\Scripts\activate.bat start /min cmd /k C:\Users\db2admin\python_environment\Scripts\activate.bat This opens the two windows and runs the bat, great, but now I need to execute another command (running a python file) in each of the cmd windows. How do I send commands to each prompt?

    Read the article

  • Text File Cannot read by Batch File

    - by Typowarrior
    I have the problem where TXT file that batch create can't be read. it turns to ECHO OFF Result. Here is 1st code need to be run. echo. wmic /output:huhu.txt Path CIM_DataFile WHERE Name='C:\\Users\\uJaNbaTus\\Desktop\\HyperTerminal.exe' Get Version echo. Then I create another .bat file with this code and run it. echo. setlocal ENABLEDELAYEDEXPANSION set revision= for /f "delims=" %%a in (huhu.txt) do ( set line=%%a if "x!line:~0,8!"=="xVersion " ( set revision=!line:~8! ) ) echo !revision! echo. endlocal When I run this .bat file the result Showing ECHO off. Btw if I create another file using notepad and replace (huhu.txt) I didn't get any error and the output come from txt file.

    Read the article

  • Prompt for credentials in a batch script

    - by Inteladu
    I am trying to perform a network copy of files via a batch script. However, as usual there are some networks where the 'copy' command fails saying 'Bad username or password'. And when I try using xcopy, it never works. I have also tried using, net use \\server\ password /user:domain\username net use \\server\ipc$ /user:domain\username password But none of these work. Any ideas on how I can accomplish this? I was also wondering if it is possible to prompt the ususal Windows login dialog for this...(just an idea) Any leads on this would be highly appreciated. Thanks & Regards, inteladu

    Read the article

  • What are the reasons to use dos batch programs in Windows?

    - by DVK
    Question What would be a good (ideally, technical) reason to ever program some non-trivial task in dos batch language on a modern Windows system as opposed to downloading either PowerShell, or ActiveState Perl? To be more specific, I make the following two assumptions for the duration of this question: anyone technical enough to be able to write a medium-complexity batch script is technical enough to install either of the scripting interpreters. Neither of those two present enough of a learning curve for basic batch replacement tasks that said curve would outweigh the pain of doing any remotely-non-trivial task in batch. Notes "You need a batch program for autoexec.bat" is not a valid reason. Your autoexec.bat may consist of simply calling non-batch script. If you disagree with either of my 2 assumptions above, that's fine, and I may be wrong. But my question is specifically "assuming those 2 assumptions are correct, what would be the reason to still stick with batch?" If it makes it easier to suspend disbelief (in case you disagree with me), add in a 3rd assumption that the question is limited to people who already posess at least some modicum of PowerShell or Perl experience. To re-iterate - this is not meant to be a subjective question about how easy it is to learn PSh or ASPerl compared to doing advanced batch coding. That is a separate question that is too subjective to be bothered with in this post. Background: I used to do some fairly complicated batch programming back in the elder days, and remember batch as one of the worst possble programming languages I had encountered. The idea for this question came after seeing a bunch of batch questions on SO, and trying to grok the answer of one of them out of sheer curiosity and giving up in pain after a minute, exclaiming mentally "why would anyone go through this pain instead of doing that in 1 line of Perl?" :) My own plausible answer I assume there may be an an likely DOS-compatible system, which has DOS interpreter but has no compatible PowerShell or Perl... I'm not aware of one but not completely impossible.

    Read the article

  • need help with automating a CMD java tool whcih qurries alexa AWS using batch

    - by Eli.C
    Hi everyone, I need to get all available info on 600 URLs from "Alexa Web Information Service", I downloaded the java tool and I'm able to run a single query each time with a single switch/Response Group. I would like to ask how to write a batch file that would automate the process ? the java tool runs from the CMD with the following: C:java UrlInfo (key1) (key2) (URL) (Response Group) UrlInfo - constant key1 - constant key2 -constant URL - variable (I guess I need to use the "(" sign to read from a file) Response Group - variable - (14 total, and I need to run each Response Group on each of the URLs once ) the app returns data in clear text formatted as XML after each query, here is an example: C:java UrlInfo (key1) (key2) www.url.com Rank Response: (?xml version="1.0"?) (aws:UrlInfoResponse xmlns:aws="http://alexa.amazonaws.com/doc/2005-10-05/") (aws:Response xmlns:aws="http://awis.amazonaws.com/doc/2005-07-11") (aws:OperationRequest) (aws:RequestId)ec2b6-e8ae-b392(/aws:RequestId) (/aws:OperationRequest) (aws:UrlInfoResult) (aws:Alexa) (aws:TrafficData) (aws:DataUrl type="canonical")url.com/(/aws:DataUrl) (aws:Rank)472906(/aws:Rank) (/aws:TrafficData) (/aws:Alexa) (/aws:UrlInfoResult) (aws:ResponseStatus xmlns:aws="http://alexa.amazonaws.com/doc/2005-10-05/") (aws:StatusCode)Success(/aws:StatusCode) (/aws:ResponseStatus) (/aws:Response) (/aws:UrlInfoResponse) Any help would be really appreciated Thanks and regards Eli.C

    Read the article

  • need help with automating a CMD java tool which queries alexa AWS using batch

    - by Eli.C
    Hi everyone, I need to get all available info on 600 URLs from "Alexa Web Information Service", I downloaded the java tool and I'm able to run a single query each time with a single switch/Response Group. I would like to ask how to write a batch file that would automate the process? The java tool runs from the CMD with the following: C:\>java UrlInfo (key1) (key2) (URL) (Response Group) UrlInfo - constant key1 - constant key2 -constant URL - variable (I guess I need to use the "(" sign to read from a file) Response Group - variable - (14 total, and I need to run each Response Group on each of the URLs once ) the app returns data in clear text formatted as XML after each query, here is an example: C:\>java UrlInfo (key1) (key2) www.url.com Rank Response: (?xml version="1.0"?) (aws:UrlInfoResponse xmlns:aws="http://alexa.amazonaws.com/doc/2005-10-05/") (aws:Response xmlns:aws="http://awis.amazonaws.com/doc/2005-07-11") (aws:OperationRequest) (aws:RequestId)ec2b6-e8ae-b392(/aws:RequestId) (/aws:OperationRequest) (aws:UrlInfoResult) (aws:Alexa) (aws:TrafficData) (aws:DataUrl type="canonical")url.com/(/aws:DataUrl) (aws:Rank)**472906**(/aws:Rank) (/aws:TrafficData) (/aws:Alexa) (/aws:UrlInfoResult) (aws:ResponseStatus xmlns:aws="http://alexa.amazonaws.com/doc/2005-10-05/") (aws:StatusCode)Success(/aws:StatusCode) (/aws:ResponseStatus) (/aws:Response) (/aws:UrlInfoResponse) Any help would be really appreciated Thanks and regards Eli.C

    Read the article

  • Batch copy gives errors, xcopy works fine

    - by ndm13
    I am writing a general file backup program. It searches the drive for files matching a set of types and then writes them to a folder on the desktop. I wrote it using xcopy on Windows XP but upon learning that xcopy was deprecated in favor of robocopy in Vista and newer, still wanting to maintain compatibility I decided to switch to the non-deprecated copy. This is where the problems begin. I'm trying to fix the copy routine. I thought I had everything sorted out, but it doesn't copy anything. My output is zero files copied for every iteration. Original Code using xcopy: for /r %%a in (*.bmp *.dds *.gif *.jpg *.jpeg *.png *.psd *.pspimage *.tga *.thm *.tif *.tiff) do ( echo f | xcopy "%%a" "%HOMEDRIVE%%HOMEPATH%\Desktop\LDR\Images\Bitmap\%%~nxa" /q /y /g /c ) Revised (broken) Code using copy: for /r %%a in (*.bmp *.dds *.gif *.jpg *.jpeg *.png *.psd *.pspimage *.tga *.thm *.tif *.tiff) do ( copy "%%a" "%HOMEDRIVE%%HOMEPATH%\Desktop\LDR\Images\Bitmap\%%~nxa" /d /y /z ) Output: The system cannot find the path specified. 0 files copied. I know that it seems everyone uses either xcopy or robocopy but can anyone help with copy? Note: I'm using Batch to keep it very lightweight and command-line accessible.

    Read the article

  • Why does this batch script terminate unexpectedly?

    - by neurolysis
    This batch script terminates when %CHECKCONTINUE% is given a null value by not inputting anything on line 13 (SET /p CHECKCONTINUE=Okay to continue? (y/n):), why is this? @ECHO OFF SETLOCAL TITLE Registry restore script REM Restores registry settings and disables the cloud SET %CHECKCONTINUE%= :listaction ECHO I'm about to... ECHO 1.) Remove the registry data that specifies settings for TF2 ECHO 2.) Forcibly disable Steam Cloud. ECHO. SET /p CHECKCONTINUE=Okay to continue? (y/n): REM No? IF %CHECKCONTINUE%==n GOTO exit IF %CHECKCONTINUE%==no GOTO exit REM Yes? IF %CHECKCONTINUE%==y GOTO start IF %CHECKCONTINUE%==yes GOTO start REM Did they put something else? IF DEFINED %CHECKCONTINUE% GOTO loop-notvalid REM Did they not put anything at all? IF NOT DEFINED %CHECKCONTINUE% GOTO loop-noreply :start REM Delete application specific data REG DELETE HKEY_CURRENT_USER\Software\Valve\Source\tf\Settings /f REG DELETE HKEY_CURRENT_USER\Software\Valve\Steam\Apps\440 /f REM Disable Steam Cloud for TF2 REG ADD HKEY_CURRENT_USER\Software\Valve\Steam\Apps\440 /v Cloud /t REG_DWORD /d "0x0" /f :exit ENDLOCAL EXIT :loop-notvalid ECHO. ECHO That's not a valid reply. Try again. ECHO. SET %CHECKCONTINUE%= GOTO listaction :loop-noreply ECHO. ECHO You must enter a reply. ECHO. SET %CHECKCONTINUE%= GOTO listaction

    Read the article

  • Batch Script to Trim lines in text to first 30 or 50 characters only

    - by SuperUserMan
    I am now new to scripts but i find it really difficult understanding "for" command (especially with that tokens and delimiters etc) . Saying so, i think that for command can be used to do what i am doing. If its not and there is an easier way, ignore my ignorance :( Say i have multiple lines in a text file abc.txt with each line starting and ending with " (quotes) E.g. a file of 3 lines "hey what is going on @mike220. I am working on your car. Its engine is in very bad condition" "Because if you knew, you'd get shredded and do it with certainty" "@honey220 Do you know someone who has busted their ass on a diet only for results to come to a screeching halt after a few weeks" How can i trim each line, within the quotes, to a Fixed length say 30 or 50 or 100 characters (including spaces) I want to enter the number of character in batch and it can trim accordingly and produce a file def.txt with trimmed lines within quotes. Say i enter 50, results of above example should be "hey what is going on @mike220. I am working on you" "Because if you knew, you'd get shredded and do it" "@honey220 Do you know someone who has busted their" Thanks P.S. if you use For command, kindly please explain the command. EDIT: Though the answer provided worked, there is an issue with non english text. I am getting garbled text in Output file for non english text in input file . Any help @barlop here is the nonenglish text ( 1 line) "???? ?? ???? ?? ???? ???? ??? ?????? ???"

    Read the article

  • batch file to deploy files

    - by Martin Michalak
    hi I have created batch file which pulls info from *.txt file and deploy code from the source to destination: SET Source=%1 if exist %Source% ( ECHO Source for WEB exists ) else ( ECHO Wrong build%Source% doesn't exist GOTO Menu ) SET Server=%2 SET AppPool=%3 SET Destination=%4 SET Folder=%5 SET ENV=%6 SET AppName=%7 SET Envlog=%8 ECHO Deployment of WEB > %Envlog% %Date% %Time% echo. @ECHO Stopping App Pools @ECHO Stopping App Pools >> %Envlog% %Date% %Time% D:\ICTTools\PSEXEC.EXE -d \\%Server% cmd.exe /c c:\windows\system32\inetsrv\appcmd STOP apppool /apppool.name:%AppPool% echo. @ECHO App Pools will be stopped in the background @ECHO App Pools will be stopped in the background >> %Envlog% %Date% %Time% Pause echo. IF EXIST "%Destination%" ( ECHO Deleting %AppName% %Folder% RMDIR %Destination% /s /q ECHO Destination Folder %Folder% Deleted ECHO Destination Folder %Folder% Deleted >> %Envlog% %Date% %Time% ) else ( ECHO Destination Folder %Destination% does not exist, please check ECHO Destination Folder %Destination% does not exist, please check >> %Envlog% %Date% %Time% Pause ) echo. @ECHO Starting Robocopy for %AppName% @ECHO Starting Robocopy for %AppName% >> %Envlog% %Date% %Time% echo. START /WAIT /MIN ROBOCOPY.EXE %Source% %Destination% *.* /S /NP /R:3 /W:5 /LOG:"Logs\Robo%AppName%%ENV%.log" D:\Tools\Windiff\windiff.exe %Source% %Destination% echo. @ECHO Finished with Robocopy @ECHO Finished with Robocopy >> %Envlog% %Date% %Time% echo. @ECHO Checking if App pools stopped: @ECHO Checking if App pools stopped: >> %Envlog% %Date% %Time% D:\ICTTools\PSEXEC.EXE \\%Server% c:\windows\system32\inetsrv\appcmd LIST apppool /apppool.name:%AppPool% @echo off set /p ask=All app pools stopped? (y/n) if %ask%==y (echo Great, please continue with deployemnt) else echo Before continuing please check why app pools did not stop @echo App pools stopped?: %ask% >> %Envlog% %Date% %Time% DEL %Source%\web.config echo. @ECHO Production Config check if exist "%Destination%\%ENV%-Web.config" ( echo. ECHO The Application production configuration file does exist. ECHO The Application production configuration file does exist. >> %Envlog% %Date% %Time% COPY %Destination%\%ENV%-Web.config web.config echo. ECHO Production %ENV%-Web.config has been renamed to web.config ECHO Production %ENV%-Web.config has been renamed to web.config >> %Envlog% %Date% %Time% ) else ( ECHO The Application production configuration file is missing in Production %AppName% ECHO The Application production configuration file is missing in Production %AppName% >> %Envlog% %Date% %Time% explorer %Destination% Pause ) echo. @ECHO Confirm that configs were renamed correclty, if yes please hit any key to START APP Pools @ECHO Confirm that configs were renamed correclty, if yes please hit any key to START APP Pools >> %Envlog% %Date% %Time% Pause echo. @ECHO Start %AppName% Application Pool >> %Envlog% %Date% %Time% D:\ICTTools\PSEXEC.EXE \\%Server% c:\windows\system32\inetsrv\appcmd START apppool /apppool.name:%AppPool% @echo off set /p ask=All app pools started? (y/n) if %ask%==y (echo Great, please continue with deployemnt) else echo Before continuing please check why app pools did not start @echo App pools started?: %ask% >> %Envlog% %Date% %Time% Pause echo. @ECHO Build Version for %AppName% @ECHO Build Version for %AppName% >> %Envlog% %Date% %Time% type %Destination%\buildinfo.xml echo. ECHO ............................................... @ECHO ...........Deployment Compelted................ @ECHO ...........Deployment Compelted................>> %Envlog% %Date% %Time% ECHO ............................................... here are my issues: Lets say I am running code for 3 servers, then for each instance: For all three servers I am performing destination folder delete even so destination folder is always the same, the code should only delete it in the 1st instance (when code is deployed to first server) then I would prefer if script would check if the code from the source and destination is the same and if it is it should delete the folder or not. Then based on 1: a) deleting web.config and renaming should only happen if code in destination is new b) Robocopy should not override files if they are the same I think there is /Xo option to do that any idea how to achieve that? :)

    Read the article

  • Batch program not running correctly in Windows 7

    - by Jennifer Heidelberger
    I am currently trying to figure out how to get a batch file to run correctly in Windows 7. I have looked on the Internet and have not had much success in finding any useful information on the issue I am encountering. BATCH FILE – The batch file is to open a window to allow students to test on a TDSM server created by ETS eCBT – The test is a CLEP Exam. The batch file is to open the workstation for students to use and it looks like it loads but the Welcome/Login Screen never appears as it should. WSK_LOAD.BAT @echo off rem-------------------------------------------------------------------- rem !!! DO NOT REMOVE OR MODIFY THIS FILE !!! rem !!! THIS FILE IS USED BY THE eCBT SYSTEM !!! rem-------------------------------------------------------------------- SET ECBT_DEFAULT_SERVER_NAME=WR-TESTING1 SET ECBT_BATCH_HOME=C:\ETSBATCH SET ECBT_HOME=\\WR-TESTING1\tdms set ECBT_LOGFILE=%ECBT_BATCH_HOME%\wsk.log SET ECBT_CLIENT_VERSION=4.0 rem---------------------------------------------------------------------- if exist %ECBT_HOME%\client\bin\wks.bat goto avail echo Cannot access %ECBT_HOME%! echo Attempting to open the share … echo If you see the share window, please close it to proceed … rem------------------------------------------------------------------------ :avail %ECBT_HOME%\client\bin\wks.bat I have tried everything I can think of: Run as Administrator, Moved files to run from the HD, made sure all files and folders associated with the program were shared with users and computers, had Windows 7 run compatibility which says it does not contain an .exe file to run, and re-wrote the file. I know it is connecting to the TDMS server as I can see it on the server. The only thing it does not do is bring up the window which is necessary to login to the testing server. The window opens like it should but does not produce the login boxes. Any and all help is appreciated, Jennifer

    Read the article

  • Restarting explorer from a batch file only opens an explorer window

    - by Ben Hooper
    In one part of a batch file (kind of), I need to restart Explorer. I use the following method to accomplish this: taskkill /f /im explorer.exe >nul explorer.exe :: I have also tried: %winDir%\explorer.exe :: start %winDir%\explorer.exe :: start /b %winDir%\explorer.exe :: start /d %winDir%\explorer.exe (as suggested by panda-34) :: :: I've even tried delaying the above commands with: ping localhost -n 11 >nul Then this happens: explorer.exe is successfully terminated (denoted by the lack of taskbar and desktop) An explorer window opens, which I am left with indefinitely (see Image 1) I can only then restart explorer by manually starting a new process from Task Manager (Win + R doesn't respond), even though explorer.exe is actually already in the process list, strangely enough.. (see Image 2)   Now, I say "kind of" as I'm running the batch file from a self-executing SFX archive, created with WinRAR. When executed, the contents of the archive are extracted to %temp% and a user-defined bootstrapper (in this case, my batch file) is run upon successful extraction. The strangest thing about it, though, is that if you manually extract the contents of the archive and run the batch file then explorer restarts correctly. It only ever glitches when called from an SFX. I'm experiencing this glitch on Windows 7 x64.   Link to an SFX archive demonstrating this, if anyone wants it: https://dl.dropbox.com/u/27573003/Social%20Distribution/restart-explorer.exe Image 1: Image 2:

    Read the article

  • Passing a Batch File an Argument Containing a Quote Containing a Space

    - by Synetech inc.
    Hi, On many occasions I have dealt with passing batch files arguments with spaces, quotes, percents, and slashes and all sorts of combinations of them. Usually I managed to figure out how to accomplish what I want, but this time I am stuck. I have tried a couple of hundred combinations now and my head is starting to hurt. I’ve reduced the problem quite nicely. It’s a simple requirement: pass a double-quoted space from one batch file to another. That is, one batch file should pass some string X to another so that the the second one echos " ". I just can’t figure out what X should be. Here is a minimal batch file that demonstrates and attempt that does not work. (This BAT file takes the place of both by calling itself.) ::Goal is to print: ::" " ::That is, to pass a quoted space from a BAT file to a BAT file if not (%1)==() goto recurse %0 "" "" :recurse echo %1 pause It does not work. I’ve tried using "\" \"", """ """, """" """", "\"" "\"", ""\" \""", "^" ^"", ^"" "^", and so on. Either they print double double-quotes, lose everything after the space, or something else (that is wrong). Any ideas? Thanks.

    Read the article

  • How to execute several batch commands in sequence

    - by ptikobj
    I want to create a Windows XP batch script that sequentially performs something like the following: @echo off :: build everything cd \workspace\project1 mvn clean install cd ..\project2 mvn clean install :: run some java file cd \workspace\project3 java -jar somefile.jar When I create a Batch script like this (following these instructions), I still have the problem that the script stops doing something after the first mvn clean install and then displays the command line. How can i execute all of these commands in sequence in one batch file? I don't want to refer to other files, I want to do it in one file.

    Read the article

  • Continous Build Integration with SourceSafe and Batch Files

    - by CraigS
    I want to create a continuous build integration system for .NET using just Windows batch files and Visual Source Safe. I've come up with the following batch file so far - set ssdir=\\xxxx\vss cd d:\mydir "C:\Program Files\Microsoft Visual SourceSafe\ss.exe" diff "$/sourcedir" -R -Q > diffout.txt This will spit out a file containg lines like "SourceSafe files different from local files" when a change has been made. My challenge is to figure out if those lines are in the file, then do a get and kick off MSBuild if they are. I'd then schedule the batch file to run every 10 minutes or so. Anyone got any thoughts on how to do that? Or any other ways of doing continuous build integration without downloading a complicated build automation system? Update: Happy to use cscript or powershell too, though not really familiar with those environments. My main aim is to avoid installing 3rd party software

    Read the article

  • Continous Build Integration with SourceSafe and Windows Batch Files

    - by CraigS
    I want to create a continuous build integration system for .NET using just Windows batch files and Visual Source Safe. I've come up with the following batch file so far - set ssdir=\\xxxx\vss cd d:\mydir "C:\Program Files\Microsoft Visual SourceSafe\ss.exe" diff "$/sourcedir" -R -Q > diffout.txt This will spit out a file containg lines like "SourceSafe files different from local files" when a change has been made. My challenge is to figure out if those lines are in the file, then do a get and kick off MSBuild if they are. I'd then schedule the batch file to run every 10 minutes or so. Anyone got any thoughts on how to do that? Or any other ways of doing continuous build integration without downloading a complicated build automation system? Update: Happy to use cscript or powershell too, though not really familiar with those environments. My main aim is to avoid installing 3rd party software

    Read the article

  • Launch .jar files with command line arguments (but with no console window)

    - by Virat Kadaru
    I have to do a demo of an application, the application has a server.jar and client.jar. Both have command line arguments and are executable. I need to launch two instances of server.jar and two instances of client.jar. I thought that using a batch file was the way to go, but, the batch file executes the first command (i.e. server.bat [argument1] [argument2]) and does not do anything else unless I close the first instance, in which case it then runs the 2nd command. And also the I do not want a blank console window to open (or be minimized) What I really need is a batch script that will just launch these apps without any console windows and launch all instances that I need. Thanks in Advance! EDIT: javaw: works if I type the command into the console window individually. If I put the same in the batch file, it will behave as before. Console window opens, one instance starts (whichever was first) and it does not proceed further unless I close the application in which case it runs the 2nd command. I want it to run all commands silently SOLUTION: Found the solution, below is the contents of my batch file @echo off start /B server.jar [arg1] [arg2] start /B server.jar [arg3] [arg4] @echo on this opens, runs all the commands and closes the window, does not wait for the command to finish.

    Read the article

  • Batch files - number of command line arguments

    - by pyko
    Just converting some shell scripts into batch files and there is one thing I can't seem to find...and that is a simple count of the number of command line arguments. eg. if you have: myapp foo bar In Shell: $# - 2 $* - foo bar $0 - myapp $1 - foo $2 - bar In batch ?? - 2 <---- what command?! %* - foo bar %0 - myapp %1 - foo %2 - bar So I've looked around, and either I'm looking in the wrong spot or I'm blind, but I can't seem to find a way to get a count of number of command line arguments passed in. Is there a command similar to shell's "$#" for batch files? ps. the closest i've found is to iterate through the %1s and use 'shift', but I need to refernece %1,%2 etc later in the script so that's no good.

    Read the article

  • Save batch file path to local harddisk

    - by Brian
    Hi, I have a batch file that is Run when a selfextraction file is executed. The self extracted files must be copied to to specefic place on the harddisc. In the batch file the user is asked where the path is (if it's not located the default place) Part of the batch file: @ECHO OFF IF EXIST "C:\Program Files\program\program.exe". ( set PROGRAMPATH=C:\Program Files\ ) ELSE ( echo Program folder was not found. Please enter the path for Program set /p PROGRAMPATH=Path: ) echo Copying data to "%PROGRAMPATH%"... copy /Y "*.txt" "%PROGRAMPATH%" Now for my question. If a user then enters a new path, is it possible to save that path. So when he executes the self extraction packagde again, it could remember that new path?

    Read the article

  • Starting a second command while the first is still running from a batch file

    - by ids
    I am trying to create a batch file that will run a utility that opens a connection to a device on the internet then starts a telnet session. I am at the point where once the connection opens the batch file doesn't proceed. Batch file @echo off set /p serial=What are the last 8 of the STB's serial? udp.exe -c 127.0.0.1 23 %serial% x.x.x.x 11111 127.0.0.1 23 | telnet 127.0.0.1 Output What are the last 8 of the STB's serial? XXXXXXX Ready for XXXXXXX It just sits at the 'ready ...' line and never opens the telnet connection. I have tried various | and & but no luck.

    Read the article

  • Batch file script for Enable & disable the "use automatic Configuration Script"

    - by Tijo Joy
    My intention is to create a .bat file that toggles the check box of "use automatic Configuration Script" in Internet Settings. The following is my script @echo OFF setlocal ENABLEEXTENSIONS set KEY_NAME="HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" set VALUE_NAME=AutoConfigURL FOR /F "usebackq skip=1 tokens=1-3" %%A IN (`REG QUERY %KEY_NAME% /v %VALUE_NAME% 2^>nul`) DO ( set ValueName=%%A set ValueType=%%B set ValueValue=%%C ) @echo Value Name = %ValueName% @echo Value Type = %ValueType% @echo Value Value = %ValueValue% IF NOT %ValueValue%==yyyy ( reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoConfigURL /t REG_SZ /d "yyyy" /f echo Proxy Enabled ) else ( echo Hai reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoConfigURL /t REG_SZ /d "" /f echo Proxy Disabled ) The output i'm getting for the Proxy Enabled part is Value Name = AutoConfigURL Value Type = REG_SZ **Value Value =yyyy** Hai The operation completed successfully. Proxy Disabled But the Proxy Enable part isn't working fine the output i get is : Value Name = AutoConfigURL Value Type = REG_SZ **Value Value =** ( was unexpected at this time. The variable "Value Value" is not getting set when we try to do the Proxy enable

    Read the article

  • Batch-Renaming Movies using Regex

    - by Nate Mara
    So, I've been trying to rename some movie files using regular expressions, but so far I have been only marginally successful. The goal is to parse files like this: 2001.A.Space.Odyssey.1968.720p.BluRay.DD5.1.x264-LiNG.mkv And rename them Like this: 2001 A Space Odyssey (1968).mkv I created the pattern: ^(.+).(\d{4}).+.(mp4|avi|mkv)$ With the output: \1 (\2).\3 Now, this works perfectly fine when I have movies with one-word titles, but when there is more than one word separated by a period, the regex fails to grab anything. What am I doing wrong here?

    Read the article

  • I am trying to zip files individually, but the file type is unknown

    - by Jason Mander
    I am trying to zip some files with an unknown file type individually. I am using the following code in a batch script to do that: @ECHO OFF FOR %%A IN (bestbuy*nat*component.cpi*) DO "C:\Program Files\7-Zip\7z.exe" a -mx9 -m0=lzma2:d256m "%%~nA.7z" "%%A" The code will compress files individually ONLY if the file has an extension. Unfortunately the files that I have don't have any extension. In the code I am trying to zip files by doing a pattern match, the files are getting compressed into ONE file (which I do not want, I want each file compressed individually). Why does this code create separate zip files when the files have an extension (for example if I add .txt to the end of the files) and when there is no extension the code creates one zipped file. Can anyone please help me with the code to compress files with unknown file type so that each file gets compressed individually Your help would be greatly appreciated. Jason

    Read the article

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