Iditically simple I hope ...
I'm trying to create a bash command file on the fly from within an W7 DOS shell:
:: inside the .BAT file ..
:: check we are in the right directory
echo pwd > command.txt
:: get the shell to echo its environment variables
:: !!!! How do I get around this ... ?
echo echo $PWD
I thought prefixing the second ...
i have double word number in si:bx.
How can i write it to array as string?
...
Hi Guys,
I wrote a simple batch file which checks whether the c drive path exists then execute the exe in that path else try the d drive path and execute it.
IF EXIST c:\program files\x goto a
ELSE goto b
:a
cd c:\program files\x
executable.exe c:\temp\col.zip
:b
cd d:\program files\x
executable.exe c:\temp\col.zip
Im getti...
Is there any example on DOS Batch - Find and Replace command for files?
I need to find all files with some exact name in a folder (and its sub folders) and replace tham all (one by one for ex) with another known file
...
I'm trying to "hide" some of my perl program from the end user to make things easier on them. I'm doing what I can to keep them out of the command prompt. The program itself has a GUI designed in Perl/Tk, so they don't have to worry about the command prompt.
Could I write out a quick batch file that goes along the lines of:
START perl ...
Respected sirs,
My name is @nimit. I want to create a batch file and run it in a DOS prompt. The batch file will execute a C++ program I've written. The output should be stored in a single text-file. How can I do this?
The C++ program output should be stored in a particular text file.
Thanks in advance,
@nimit
...
I have two batch files which is used to run a large c+_+ build, the first one starts the processes, creating directories and figuring out what to send to the second script. If certain information is presented to the first script, I have a routine that pops up a window and asks for a password. This is passed to the second script by callin...
Hi,
I'm trying to install this fossil in DOS 6.22, which is running in Microsoft Virtual PC 2007. I'm hoping that some of you veteran Oracle developers have any recollection of in what order do these diskette images need to be loaded, since I don't have any documentation available for 6.0.33.
A friend emailed me the following 720K di...
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...
Hi, I'm working on a small hobby web site where I'm able to launch a local app with certain arguments based on links. Setting up a protocol wasn't difficult, as described in http://msdn.microsoft.com/en-us/library/aa767914(VS.85).aspx, but I have one dilemma:
Let's say the protocol is: foo:127.0.0.1:1111, so a link like href="foo:127.0.0...
Sometimes I run a command in cmd such as:
fc /b file1 file2
and would like to see the return code from fc. Is there a simple way to do this?
...
I need to create a batch file that reads a file with one line and then renames the same file based on the contents.
The file will have one number and the condition to rename the file is this:
If content of file > 100 then rename new.txt to old.txt
else rename new.txt to new1.txt
Thanks for the help!
...
I was trying to execute a command through C#, but when I run the following code, a blank cmd window just opens up. The code:
string command = string.Format(@"adb install C:\Users\Mohit\Programming\Android_Workspace\{0}\bin\{0}.apk", appName);
ProcessStartInfo cmdsi = new ProcessStartInfo("cmd.exe");
cmdsi.Arguments = command;
Process cm...
Basically we need to change the end of line characters for a group of files.
Is there a way to accomplish this with a batch file? Is there a freeware utility?
...
I got the code
Set objFS = CreateObject("Scripting.FileSystemObject")
strFile = "C:\test\file.txt"
Set objFile = objFS.OpenTextFile(strFile)
Do Until objFile.AtEndOfStream
strLine = objFile.ReadLine
If InStr(strLine,"ex3")> 0 Then
strLine = Replace(strLine,"ex3","ex5")
End If
WScript.Echo strLine
Loop
The str...
I have multiple websites set up in the same folder, and I want to create a batch file that will delete the cache in each of them without having to add a new line for each site. For example I am using this:
del /S /Q D:\www\site-name\cache\*
Which works, but I have to add a new line for every site in D:\www. The del command doesn't sup...
Hello All,
I am trying to read some info from a text file by using windows command line, and save it to a variable just like "set info =1234"
Below is the content of the txt file, actually I just need the revision number, and the location of it is always the same line 5, and from column 11 to 15. In the sample it's 1234, and I am wonde...
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 a...
I see in a lot of the tutorials and how to pages, they use the following, or something similar
ruby C:\test.rb
Which would parse test.rb to the interpreter and ... execute the script. But how is this done a on a windows? Ruby isn't a recognized internal command (as per the DOS output)?
I know how to do all these things on Linux, and i...
PHP 5.2.13 on Windows 2003
I am using the DOS Start /B command to launch a background application using the PHP popen() function:
popen("start /B {$_SERVER['HOMEPATH']}/{$app}.exe > {$_SERVER['HOMEPATH']}/bg_output.log 2>&1 & echo $!", 'r');
The popen() function launches a cmd.exe process that runs the specified command; however, if...