Search Results

Search found 3546 results on 142 pages for 'dos batch'.

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

  • MS-DOS 6.22 keyboard configuration

    - by AlexV
    I have MS-DOS 6.22 in a virtual machine (Virtual PC 2007) and I wanted to properly configure the keyboard. The keyboard I have is a French-Canadian one (FYI in Windows XP my keyboard is labeled "Français (Canada) - Français (Canada)" in the control pannel). What do I need to put in autoexec.bat and config.sys in order to use the keyboard properly (Windows 3.11 will be installed later if it matters)? I haven't configured DOS since like 14 years so all my references are lost/trashed now :)

    Read the article

  • Batch file to wait for other program to load/initialize, then execute command?

    - by Jason N
    I need some assistance writing what should be a fairly basic .BAT file. I load my main program, but that program takes ~20secs to load and be initialized. I have another command-line API I can execute to interact with this above program, but obviously until the above program is loaded and initialized there's no point in trying. If the program isn't running the command-line API returns a string stating exactly this - otherwise it just works and exits. Easy. So I want to wait until the above is loaded/initialized before firing my API command(s) at it. I could place a sleep/wait in there, but I want something more solid. The ~20sec wait is not necessarily consistent. Any way to execute the command-line API over and over until the response is satisfactory, then exit? J

    Read the article

  • Batch script to rename portionof a filename

    - by Rubik'sCube
    I've been trying to make a script that will a file name and change only one word in it. An example would be: projectname.vcproj.domainname.username.user to projectname.vcproj.otherdomainname.username.user I've tried using the if loop to list the directory and set the delimiter to a period but it doesn't seem to be able to identify and change it. I'm using examples of renaming .txt files but it doesn't seem to work, any suggestions?

    Read the article

  • Escaping an equals sign in DOS batch string replacement command

    - by Alastair
    I need to replace some text in a JNLP file using a DOS batch file to tune it for the local machine. The problem is that the search pattern contains an equals sign which is messing up the string replacement in the batch file. I want to replace the line, <j2se version="1.5" initial-heap-size="100M" max-heap-size="100M"/> with specific settings for the initial and max heap sizes. For example at the moment I have, for /f "tokens=* delims=" %%a in (%filePath%agility.jnlp) do ( set str=%%a set str=!str:initial-heap-size="100M"=initial-heap-size="%min%M"! echo !str!>>%filePath%new.jnlp) but the = in the search pattern is being read as part of the replacement command. How do I escape the equals sign so it is processed as text?

    Read the article

  • Iterating through folders and files in batch file?

    - by Will Marcouiller
    Here's my situation. A project has as objective to migrate some attachments to another system. These attachments will be located to a parent folder, let's say "Folder 0" (see this question's diagram for better understanding), and they will be zipped/compressed. I want my batch script to be called like so: BatchScript.bat "c:\temp\usd\Folder 0" I'm using 7za.exe as the command line extraction tool. What I want my batch script to do is to iterate through the "Folder 0"'s subfolders, and extract all of the containing ZIP files into their respective folder. It is obligatory that the files extracted are in the same folder as their respective ZIP files. So, files contained in "File 1.zip" are needed in "Folder 1" and so forth. I have read about the FOR...DO command on Windows XP Professional Product Documentation - Using Batch Files. Here's my script: @ECHO OFF FOR /D %folder IN (%%rootFolderCmdLnParam) DO FOR %zippedFile IN (*.zip) DO 7za.exe e %zippedFile I guess that I would also need to change the actual directory before calling 7za.exe e %zippedFile for file extraction, but I can't figure out how in this batch file (through I know how in command line, and even if I know it is the same instruction "cd"). Anyone's help is gratefully appreciated.

    Read the article

  • Batch Script [Loop through file names]

    - by Kyl3
    Hi, I would like a batch script to all the text documents in a folder. This is what I have managed so far @ECHO off title Test set dir1=C:\Users\Family\Desktop\Example :Start cls echo 1. test loop echo 2. Quit set /p choice=I choose (1,2): if %choice%==1 goto test if %choice%==2 exit :test cls echo running loop test FOR %%n in (%dir1% *.txt) DO echo %dir1%\%%n echo Done pause What I would like outputted is running loop test C:\Users\Family\Desktop\Example\doc 1.txt C:\Users\Family\Desktop\Example\doc 2.txt Done But I Get this running loop test C:\Users\Family\Desktop\Example\C:\Users\Family\Desktop\Example C:\Users\Family\Desktop\Example\doc 1.txt C:\Users\Family\Desktop\Example\doc 2.txt Done Thanks in advance Kyle

    Read the article

  • Batch File to Delete Folders

    - by Homebrew
    I found some code to delete folders, in this case deleting all but 'n' # of folders. I created 10 test folders, plus 1 that was already there. I want to delete all but 4. The code works, it leaves 4 of my test folders, except that it also leaves the other folder. Is there some attribute of the other folder that's getting checked in the batch file that's stopping it from getting deleted ? It was created through a job a couple of weeks ago. Here's the code I stole (but don't really understand the details): rem DOS - Delete Folders if # folders > n @Echo Off :: User Variables :: Set this to the number of folders you want to keep Set _NumtoKeep=4 :: Set this to the folder that contains the folders to check and delete Set _Path=C:\MyFolder_Temp\FolderTest If Exist "%temp%\tf}1{" Del "%temp%\tf}1{" PushD %_Path% Set _s=%_NumtoKeep% If %_NumtoKeep%==1 set _s=single For /F "tokens=* skip=%_NumtoKeep%" %%I In ('dir "%_Path%" /AD /B /O-D /TW') Do ( If Exist "%temp%\tf}1{" ( Echo %%I:%%~fI >>"%temp%\tf}1{" ) Else ( Echo.>"%temp%\tf}1{" Echo Do you wish to delete the following folders?>>"%temp%\tf}1{" Echo Date Name>>"%temp%\tf}1{" Echo %%I:%%~fI >>"%temp%\tf}1{" )) PopD If Not Exist "%temp%\tf}1{" Echo No Folders Found to delete & Goto _Done Type "%temp%\tf}1{" | More Set _rdflag= /q Goto _Removeold Set _rdflag= :_Removeold For /F "tokens=1* skip=3 Delims=:" %%I In ('type "%temp%\tf}1{"') Do ( If "%_rdflag%"=="" Echo Deleting rd /s%_rdflag% "%%J") :_Done If Exist "%temp%\tf}1{" Del "%temp%\tf}1{"

    Read the article

  • Read ini from windows batch file

    - by Hintswen
    I'm trying to read a ini file with this format: [SectionName] total=4 [AnotherSectionName] total=7 [OtherSectionName] total=12 Basically I want to echo out certain values from the ini file(eg. the total under OtherSectionName followed by the total from AnotherSectionName).

    Read the article

  • Run batch on files in a relative folder

    - by Matteo Cuellar Vega
    I have a windows batch script that runs a SOX command on various files, but I don't know how to get the batch to run on files in a relative path to that of the SOX executable. Currently all the files are in the root and it outputs to /combined. The Batch Script: cd %~dp0 mkdir combined FOR %%A IN (*.mp3) DO sox static.mp3 %%A "combined/%%~nxA" pause I want the script to run the sox command on files in the directory "audiotracks" and output it to the directory "combined". To give you an idea, this would be the desired folder structure: /root sox.exe batch.bat static.mp3 /audiotracks audio1.mp3 audio2.mp3 audio3.mp3 audio4.mp3 /combined audio1out.mp3 audio2out.mp3 audio3out.mp3 audio4out.mp3 Is this possible, or is there a better method of doing this? Any help would be greatly appreciated. Thanks a lot!

    Read the article

  • Use DOS batch to move all files up 1 directory

    - by Harminoff
    I have created a batch file to be executed through the right-click menu in Win7. When I right-click on a folder, I would like the batch file to move all files (excluding folders) up 1 directory. I have this so far: PUSHHD %1 MOVE "%1\*.*" ..\ This seems to work as long as the folder I'm moving files from doesn't have any spaces. When the folder does have spaces, I get an error message: "The syntax of the command is incorrect." So my batch works on a folder titled PULLTEST but not on a folder titled PULL TEST. Again, I don't need it to move folders, just files. And I would like it to work in any directory on any drive. There will be no specific directories that I will be working in. It will be random. Below is the registry file I made if needed for reference. Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Directory\shell\PullFiles] @="PullFilesUP" [HKEY_CLASSES_ROOT\Directory\shell\PullFiles\command] @="\"C:\\Program Files\\MyBatchs\\PullFiles.bat\" \"%1\""

    Read the article

  • Windows batch file to delete folders/subfolders using wildcards

    - by Marco Demaio
    I need to delete all folders in "tomin" folder, which name contains terminates with the ".delme" string. The deletion need to be done recurively: I mean on all directory and SUB directories. I though to do this: FOR /R tomin %%X IN (*.delme) DO (RD /S /Q "%%X") but it does not work, I think /R ignores wildcards. Before asking this quation I searched also in SO and found this: but the answers did not help me in solving my issue, following the suggestion given there I tried: FOR /F tomin "delims=" %%X IN ('dir /b /ad *.delme') DO RD /S /Q "%%X" But it did not work either. Any help aprreciated, thanks!

    Read the article

  • Copy & rename file using .bat file language?

    - by flyout
    I want to make a .bat to copy & rename a file multiple times. I want to have a list of names, and an original file, then I want to copy that file and rename it for each name on the list. How I can do this using a .bat file? Also is it possible to run winrar fromthe .bat to .rar or .zip every file after copying/renaming?

    Read the article

  • How can I run this batch file?

    - by tech
    OSQL -S 127.0.0.1 -U sa -P password RESTORE DATABASE DATA FROM DISK = C:\backup\data.dat GO EXIT This is the batch file. but after I run the OSQL -S 127.0.0.1 -U sa -P password, the dos command start with the line 1> After that, the batch cmd can't run. How can I fix this problem? thz.

    Read the article

  • avoiding console window display when scheduled task runs batch file

    - by cherouvim
    Hello I have a small batch file which xcopies some files from one folder to another which I've scheduled (via windows scheduled tasks) to run every 1 hour: @echo off xcopy c:\foo c:\bar /E /C /F /Y Since this is my workstation, I'm most probably doing work when the task executes, and then the black dos console window is displayed (lasts 2-3 seconds) and steals window focus. I don't wish to see the files copied and of course the batch file does not ask for any user input. Is there a way to avoid displaying the console completely? thanks

    Read the article

  • Windows batch-file that continues after launching each program

    - by Sandy
    I'm trying to create a very simple Windows-XP batch file: Program1.exe Sleep 3 Program2.exe Sleep 5 Program3.exe Sleep 11 Of course, I don't want to have to exit each program, before the next 1 starts. The default for batch-files seems to be "stop until the previous program exists". How do I get this script to run as expected? Edit: The 3 executables listed above are more like "notepad" type programs. They open and run and don't just "open,run,close".

    Read the article

  • In Dos batch file press ENTER key to open program or press any other key to exit from bat.

    - by user521875
    I have a DOS batch file that show some results on the cmd console. I want users to press Enter to run program or press any other key on the keyboard to exit. I don't want to use options/choices because in that case user will have to enter at least something which I need to check and set the action. Example: At the end of the cmd console something say like this Press ENTER to open abc.exe or press any key on the keyboard to exit! Thanks!

    Read the article

  • How to run a powershell script within a DOS batch file

    - by Don Vince
    How do I have a powershell script embedded within the same file as a DOS batch script? I know this kind of thing is possible in other scenarios: Embedding SQL in a DOS batch script using sqlcmd and a clever arrangements of goto's and comments at the beginning of the file In a *nix environment having a the name of the program you wish to run the script with on the first line of the script commented out e.g. #!/usr/local/bin/python There may not be a way to do this - in which case I will have to call the separate powershell script from the launching DOS script. One possible solution I've considered is to echo out the powershell script, and then run it. A good reason to not do this is that part of the reason to attempt this is to be using the advantages of the powershell environment without the pain of, for example, DOS escape characters I have some unusual constraints and would like to find an elegant solution. I suspect this question may be baiting responses of the variety: "why don't you try and solve this different problem instead." Suffice to say these are my constraints, sorry about that. Any ideas? Is there a suitable combination of clever comments and escape characters that will enable me to achieve this? Some thoughts on how to achieve this: A carat ^ at the end of a line in DOS is a continuation - like an underscore in VB An ampersand & in DOS typically is used to separate commands echo Hello & echo World results in 2 echos on separate lines %0 will give you the script that's currently running So something like this (if I could make it work) would be good: # & call powershell -psconsolefile %0 # & goto :EOF /* From here on in we're running nice juicy powershell code */ Write-Output "Hello World" Except... It doesn't work... because the extension of the file isn't as per powershell's liking: Windows PowerShell console file "insideout.bat" extension is not psc1. Windows PowerShell console file extension must be psc1. DOS isn't really altogether happy with the situation either - although it does stumble on '#' is not recognized as an internal or external command, operable program or batch file.

    Read the article

  • Running Java from a Windows batch file causes the batch file to stop

    - by jjkparker
    When I run Java from a Windows .cmd file (Vista 32-bit here), the Java command causes the batch file to stop executing additional commands. For example, this is a simple test.cmd file: java java This should cause Java to print its help message twice. However when I run it in cmd.exe, I get this: C:\>test C:\>java Usage: java [-options] class [args...] (to execute a class) or java [-options] -jar jarfile [args...] (to execute a jar file) where options include: -client to select the "client" VM -server to select the "server" VM ... C:\> The batch file simply exits when Java exits. What's going on here?

    Read the article

  • Need assistance making a batch file for renaming files in separate folders

    - by Carnaxus
    Ok, here's one for you. I'm trying to use a batch file to rename a bunch of files, but none of them are in the same folder as the batch file itself. The command prompt keeps telling me that the directory can't be found. I suppose I could just rename all the files in all the folders that match the filename, but I don't want to do that either; I only want to change certain ones. My batch file as it stands is: @echo off ren "engine/info.txt" "disabled.txt" ren "gravplating/info.txt" "disabled.txt" ren "HAWX content/info.txt" "disabled.txt" ren "laserz/info.txt" "disabled.txt" ren "NeuroNaval/info.txt" "disabled.txt" ren "NeuroPlanes/info.txt" "disabled.txt" ren "NeuroTanks/info.txt" "disabled.txt" ren "NeuroWeapons/info.txt" "disabled.txt" ren "WAC Base/info.txt" "disabled.txt" ren "WAC DamageSystem/info.txt" "disabled.txt" ren "WAC GravityController/info.txt" "disabled.txt" ren "WAC Helicopters/info.txt" "disabled.txt" ren "WAC Sweps/info.txt" "disabled.txt" ren "weapons/info.txt" "disabled.txt" ren "AFF_ships/info.txt" "disabled.txt" ren "AntiTakeRifle/info.txt" "disabled.txt" ren "Catmull-Rom Cameras/info.txt" "disabled.txt" ren "Displacer Cannon/info.txt" "disabled.txt" ren "Drumdevil's Trains/info.txt" "disabled.txt" ren "EVEOnline/info.txt" "disabled.txt" ren "gm_botmap_v3/info.txt" "disabled.txt" ren "gm_construct_flatgrass_v5-2/info.txt" "disabled.txt" ren "gm_mobenix_v3_final/info.txt" "disabled.txt" ren "gm_mobenix_v3_highquality_Water/info.txt" "disabled.txt" ren "gm_snabbansairfield_b1/info.txt" "disabled.txt" ren "gm_XhS_construct/info.txt" "disabled.txt" ren "linedraw/info.txt" "disabled.txt" ren "ModelManipulator/info.txt" "disabled.txt" ren "NeuroCars/info.txt" "disabled.txt" ren "Propeller Engine/info.txt" "disabled.txt" ren "VanDookie and Predaaator's pack/info.txt" "disabled.txt" ren "WAC ECM/info.txt" "disabled.txt" ren "WAC Extra Helicopters/info.txt" "disabled.txt" echo Done! pause

    Read the article

  • Running Batch File As An Administrator…

    - by WidmarkRob
    I successfully created a batch file to flush my DNS. I have added a pause, I noticed in the title bar of the console window… It's not running as administrator. I've already tried a couple of variations of this… Just a little guidance would be most appreciated. I remember reading a blog somewhere, it said something about capitalization wasn't important… Is camel casing important in writing batch files? @echo off echo. pause CD.. CD.. echo. runas /user:<Administrator> ipconfig /flushdns echo. pause echo.

    Read the article

  • How to run a command as admin in MSDos?

    - by tech
    I want to run a dos command in dos prompt, but this dos command is only executed using admin right. So, I can right click the command prompt to run as administrator, but I wanna to run one line of dos command using the admin right, can I run dos command in dos prompt like sudo in DOS cmd? thz u.

    Read the article

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