I am running a Windows 7 system where i want to be able to set a system environment variable and be able to see it in subsequent command prompts that i launch.
When i set the system environment variable using "setx" thins work fine, But given that i want to use the same script code for XP and Windows 7 I cannot do this on XP because XP ...
trying to create a batch file for setting the user documents folder in windows so that it is accessible from the network like the public folder is by default, pretty much making it shared with everybody
Cant figure out the synthax for it though. So far tried messing with Cacls but without any luck.
Testing it on vista/7
...
print exit code in cmd in windows os ....some command return exit code ...where this code store...and i want to print this exit code and assign it to variable
...
Is there a way to get coloured output with git in cmd? If yes, how?
Platform: XP SP3.
...
example 1
@echo off
for %%a in (precomp.exe) do set pc=%%~fa
for /r %%a in (*.pcf) do (
pushd %%~dpa
echo [%pc% -r %%~nxa]
%pc% -r %%~nxa
popd
)
When i run the bat i get precomp.exe is an unknown command I have precomp
in the folder with the script. But it will only work if i copy precompt to every sub directory an...
I'm using a local server on my laptop to control a C# program via PHP. Basically I'm taking a POST passed to my web server, and using it as the parameters for a command line program. My code is essentially this:
$parameters = $_POST['parameters'];
system('C://THEFILEPATH/myprogram.exe ' . $parameters);
The problem is that this cause...
Hi, I have a problem when I generate an animated gif from a movie.avi using ffmpeg from python in Win7.
If I open a cmd window and execute this line:
"C:\ffmpeg\ffmpeg.exe" -i "C:\ffmpeg\video.avi" -pix_fmt rgb24 -r 10.0 -loop_output 0 -ss 5 -t 10 -s 352x288 -f gif "C:\ffmpeg\video.gif"
ffmpeg.exe generates a gif perfectly from the vi...
I frequently find myself using setlocal within cmd.exe to avoid polluting the environment variable space with temporary variables (and to ensure both command extensions and delayed expansion are active).
However, I'm at a loss on how to do this if I actually want one of those variables to be made available.
Consider the following code ...
I'm developing a PHP App on IIS 7.5, which uses PHP FTP commands.
These all work, apart from ftp_size().
I've tested:
cmd.exe > ftp host > username > password > SIZE filename = Invalid Command
However, if I access the FTP site through an Internet Browser, the filesize is displayed.
Do I need to install FTP Extensions, and if so, whi...
how can I run system("") without showing cmd.exe?
I use cstdlib header
code::blocks 10.5
I saw this question for c# but I don't know c# ;)
...
Dear Friends,
I need to develop a utility which opens the outlook express new mail window with attachment. I need to invoke this from command line i have tried various things please help me....
...
I wanna print a few values in the console, how do I do this?
Every time I get into a function, I want it to print a line with whatever text, I just wanna know if I'm getting into the function, and for some if-else statements.
Mostly for debugging.
...
After a bit of googling and searching here, couldn't find the answer to this silly question!
For a structure like this...
dirZero
|---dirOne
|---|---myProgram.exe
How do I run "myProgram" if my current directory is dirZero? I.E.,
C:\dirZero> dirOne/myProgram.exe
...which obviously doesn't work. Thanks in advance.
...
Hi,
I am new to the Windows CMD and am running into an issue. I am trying to figure out how to find items in the tasklist using multiple parameters. In this case, I want to see items where the Image Name is Javaw.exe and the user is aaaa. Taken seperately, each of these commands work:
tasklist /V /FI "IMAGENAME eq javaw.exe"
tasklis...
I've got Git for Windows setup (msysgit) and it was working fine for the last few days and today I've encountered an odd error.
When issuing a Git command in the Windows Command Prompt or in the Git Bash that comes bundled with msysgit, I get a strange '(END)' line appear and then I cannot issue any other comamnds.
At this point all...
Possible Duplicate:
Equivalent of Backticks in Python
When I want to write directly to the command prompt in Perl, I can do something like this:
Perl File test.pl:
$directory = `dir`;
print $directory;
Which would output something like..
C:\Documents and
Settings\joslim\Desktop>perl test.pl
Volume in d...
Hello
I have a DOS batch file that performs an action for files beginning with text "SP", as follows:
FOR /F "tokens=*" %%A IN ( 'DIR SP*.sql /s /b' ) DO ECHO .compile_file = "%%A" >> output.txt
The key bit here is obviously:
DIR SP*.sql /s /b
I need to do a similar thing before the "FOR" line above, but for all other files not st...
Title says it. I know I can use Process or ProcessStartInfo to run arguments, but I mean actually adding a command prompt control to my app (because I use it very often and it'd be convenient if it was already built-in.
Is there any way to do this other than coding a custom control? If not I can live with it, but it would definitely hel...
Hi guys, trying to make a .bat script, and need to get some strings working properly.
This is what I've got so far
@echo off
for /r %%i in (*.csv) do (
set str=%%i
set str=%str:csv=rar%
echo %%i
echo.%str%
)
Say I've got this running in C:\, and got 5 csv, 1.csv, 2.csv... 5.csv
First time I run it, I get output of:
C:\1.csv
C:\2.c...
I have the following matrix
1 2 3 4 5 6
2 3 4 5 6 1
3 4 5 6 1 2
4 5 6 1 2 3
5 6 1 2 3 4
6 1 2 3 4 5
...and I want to have it in a table
| 1 2 3 4 5 6
---------------
1| 1 2 3 4 5 6
2| 2 3 4 5 6 1
3| 3 4 5 6 1 2
4| 4 5 6 1 2 3
5| 5 6 1 2 3 4
6| 6 1 2 3 4 5
Having n elements is it possible to print such a table dynamically?
...