Hi guys
Havin' problems tryin' to get the string after the : in the following two lines into two seperate variables from the bottom of a text file called file.txt for example
Number of files to delete: 27 Total
Total size of files to delete: 1,427 KB
I just want the 27 in one variable, and the 1,427 in another.
These are randomly gen...
Hi. Sorry my newbie question :P If I promp "java -version" in the cmd on a windows system, am I guaranteed that the system will be able to run .jar files if I don't get any error?
...
Continuous Integration
I have been working on a PowerShell script to keep our development process streamlined. I was planning on running it as a post-build event, but I'm having some trouble.
From the PowerShell prompt, the following works wonderfully:
PS C:\> ./example.ps1
However, when attempting to run this from cmd.exe as follo...
I've been programming in dozens of languages for 20 years but I could never understand how "FOR" work in windows cmd shell batch file, no matter how hard I tried. I read
http://www.amazon.com/Windows-Administration-Command-Line-Vista/dp/0470046163/ref=sr_1_1?ie=UTF8&s=books&qid=1241362727&sr=8-1
http://www.ss64.com/nt/for...
I'm currently writing myself a little C# back up program. I'm using a standard windows form for the interface, and am calling cmd.exe as a new process, and then using XCOPY from within this new process. Every thing's working great, except for this last feature I want to add in, which is the ability to break the operation.
From a nat...
I'm using a batch file to open a few new windows. Once they complete their processes, I have the /c set they quit. However, I'd like for my main batch process to wait for one window to finish before moving on, instead of doing everything at once.
For example, if my main batch file has:
@ECHO OFF
start "Win1" cmd.exe /c scomp -out ........
I'm writing a batch file that needs to delete all the files in a certain dir and all of it's subdirectories except those of a specific type.
How can I do this?
...
I have this idea that I should switch over from cmd.exe to powershell. It's so much more powerful than the tried and tested cmd.exe. It is the shell of the future for Windows.
But my facility in powershell is so limited, in comparison with cmd.exe. Around every corner I discover another seemingly small obstacle that is insurmountable...
I recently followed a small tutorial on howto install apache on a systems where you're not the admin. Basically, the original htdocs and conf folders were copied to a map I have ownership over, the original ones deleted and then symbolic links were created.
Now, I checked mklink /? and it gives several options.
Directory symbolic link...
First I chage Windows CMD encoding to utf-8 and run Python interpreter:
chcp 65001
python
Then I try to print a unicode sting inside it and when i do this Python crashes in a peculiar way (I just get a cmd prompt in the same window).
>>> import sys
>>> print u'ëèæîð'.encode(sys.stdin.encoding)
Any ideas why it happ...
How do i launch 2 apps at once in a .bat file? my current text is
cd mydir
my.exe
my.exe difParams
//bat is finished. i dont want my.exe to close
...
How can a batch file by itself see where it is located?
...
hi all,
thanks to all for ur valuable replies..
Also, in linux mkdir -p creates a folder tree..
What is the equivalent option in Windows( to create a folder tree) ? Is there any?
Renjith G
...
I am writing a program that needs to run a java.jar server. I need to run the process directly so I can rewrite the output to a textbox and all-in-all have complete control of it. I tried just doing it through CMD.exe, but that wouldnt work because CMD.exe would just call a new process java.exe and I wouldn't have control of it. I need t...
I have a batch file that executes a java application. I'm trying to modify it so that whenever an exception occurs, it'll write the STDERR out to a file.
It looks something like this:
start java something.jar method %1 %2 2>> log.txt
Is there a way I can write the arguments %1 and %2 to the log.txt file as well? I don't want to wri...
How do I find the local path on windows in a command prompt?
...
hi,
i'm trying to compile the J2ME java files from command line from 2 week ago !
at now i can compile project successfully and also create JAR and JAD files .
the files that i compile work equivocal, this means if i use basic class the same as TextField or Form or others this work successfully but if I use RecordStores OR more important...
This is related to this question : How to get coloured file listing in windows cmd shell ?
I'm trying to get, wouldn't you believe it, coloured file listing in windows cmd shell. Windows are XP SP2, if that matters.
In the old DOS days there used to be little programs like hdir, adir and such which displayed that nice. Nowadays, such pr...
I need to be able to grant rights to a user from a script (a batch file or JScript file). In particular, I want to grant SeServiceLogonRight to a particular domain account. I can't use NTRights.exe (not available on all target OS's), and I'd like to avoid having to write an executable in C just for this. Is it possible to do this with st...
When I run e.g. ipconfig using the Run command (windows key+R), once the program has executed it immediately closes the instance of the command line interface, is there any universal parameter I can add to:
ipconfig
nslookup
dir
etc...
to ensure that the results stay printed in the console window?
...