cmd

How to open and run a specific script from the command line in eclipse

I am trying to run an automated suite every day at the same time, so I want to create a task to open eclipse and execute the main script every day. Is there a way to do this from the command line? ...

how to tell what version of windows and/or cmd.exe a batch file is running on?

How can one determine what version of Windows and/or cmd.exe a batch file is running on? There is no cmd /version that I've been able to find and the results of SET in a command prompt session don't give anything obviously unique (between XP and Win7 anyway). Summarized Answer The internal command ver reports windows version number (w...

Modify Windows Command Prompt History from a Program?

Is there an API to add to the a windows command prompt history? I writing a console program and it would be handy to pop some commands into the history buffer under certain (limited) conditions. ...

How to capture the PID of a process when launching it in DOS

Is there a way to do this purely in a .bat file? The purpose is to launch iexplore, then kill just that instance when it's finished.. ...

Set a path variable with spaces in the path in a Windows .cmd file or batch file

I'm new to script writing and can't get this one to work. I could if I moved the files to a path without a space in it, but I'd like it to work with the space if it could. I want to extract a bunch of Office updates to a folder with a .cmd file. To make the batch file usable on any computer, I set a path variable which I only have t...

System32 Folder on a 64-bit system

Hi there I have a cmd file that runs on 32 bit Vista system. I notice that the code has references to the system32 driver folder. I'm wondering whether the code could potentially run on a 64 bit Windows 7 system. So I guess my question is Does a 64 bit system contain a system32 folder? Be very grateful for any replies. ...

find value in a.txt , put it as an input in b.txt using batch

Hi guys, I am looking for your help on the following. I am going to read a value in a.txt, and put it as an input for b.txt The problem is, in a.txt, the value will keep changing due to iteration process. So, it is better to point a pointer to WHERE the value will appear. Ex. (as in a.txt file) X = 12345 so, i would like to point wh...

Math on batch (win)

Hello, i am developing a CMD batch kind of thing. Now, i want to do some math in it. This formula: (x+1)100:y or for guys who are not so good in math: x+1, answer times 100, answer devided by y. So in batch, x = %x%, and y = %y%. So, i know how to set the variables. Now, how can batch calculate this? (WINDOWS CMD) Do i need some...

Drag a link into a batch file

I like using %1 in my batch files, but dragging a link over from the browser (Chrome) doesn't work. My batch file is echo %1 pause How can I make it accept dragged links? ...

Run Site in xx Second in CMD

Hi Can you help me in CMD. i want to make batch file,like this: when opening this file it must open one web-site and in some second(for example in 10 sec) it must open the second web-site and the third and so and so . Please help me doing this. ...

Variables in batch and registry edit for right-click support

Hello, I have this batch file which needs to do some stuff in a folder. This is what i want: -A shortcut when you right-click. (shell32 i think you should edit with the registry or so...? Can somebody say so?) -If that shortcut is pressed, the batch is opened, and it locates the folder were was right-clicked. It should set this as a ...

DOS echo command can't echo a user-set variable

What did I do to screw up my CMD shell? Windows XP Pro, open a cmd window and do: C:\>set tt = name C:\>set tt tt = name C:\>echo %tt% %tt% C:\>echo %time% 14:13:28.67 The echo command doesn't work for some reason. I can echo the built-in variables just fine. Tried it on another computer and that works as expected ...

Killing a process in Batch and reporting on success

Hello, i have the following batch file, which terminates the iTunes program so, that if i connect my iPod, it's not going to sync it. (I know you can set this up in iTunes.) @echo off :kill cls taskkill /F /IM itunes.exe >nul if %errorlevel%==1 { echo iTunes not found. } else { echo iTunes is killed. } goto kill However, the >nul does...

CMD: Sleep and hit any key, at the same time?

Hello, i have this batch file, which makes constantly a loop. I want the user to be able to terminate it in the batch, not just clicking the X. This is what i need (somehow): @echo off :proc cls rem All kind of stuff... echo Hit any key to terminate... sleep 1 @pause>nul But, of course, sleep and pause can't work at the same time. ...

Getting rid of extensions in variables (CMD)

CMD Q: I want to remove the extension of a filename. It is actually a complete path, like C:/Me/My/Path/filename.xxxx i know that the extension has 4 chars, like shown in example above. How can i get rid of the extension? Thanks. ...

My schtasks don't schedule anything. :(

I'm trying to make a scheduled task, and its just not working for me. This is the command I type in CMD: schtasks /create /sc minute /mo 1 /tn test /tr calc.exe /st 19:17:00 /sd 12/14/2009 I'm trying to tell the computer to run calculator every minute starting at 7:09 PM. Although I get a success message after I type this in and hit en...

Why does cmd.exe have different errorlevel behavior on a 64-bit machine?

If I make a batch script named temp.bat (for example) containing: exit /b 1 When I run it in various ways, I get different behavior on my 32-bit XP system vs. a 64-bit XP system. On 32-bit: > temp.bat > echo %ERRORLEVEL% 1 > cmd /c temp.bat > echo %ERRORLEVEL% 0 On 64-bit: > temp.bat > echo %ERRORLEVEL% 1 > cmd /c temp.bat > ech...

Drupal: add contact form as field to user profile

Drupal allows you to create additional fields for user profile pages that can be publically accessible (anonymous user). I would like to add a contact form on each user´s profile page. I know that each user already has a contact page, but I want to have a contact form that´s embedded on the http://localhost/users/foobar page. Maybe ther...

Why does CUDA.rules have two identical command lines

The commandline for CUDA.rules file is: echo [CompilerPath] [Keep] [CInterleavedPTX] [ExtraNvccOptions] [Arch] -ccbin "$(VCInstallDir)bin" [Emulation] [FastMath] [Defines] -Xcompiler "/EHsc [Warning] /nologo [Optimization] /Zi [RuntimeChecks] [Runtime] [TypeInfo] [ExtraCppOptions]" [Include] [MaxRegCount] [PtxAsOption...

path variable: removing unwanted items

background info; an application is installed on many different PCs, W2000 and XP pro and for multiple users, let's call it foobar, note there is no msi or silent uninstall for this app. therefore, we would like to remove its' entry manualy; If in the registry environment (path line) we have path=c:\windows;c:\windows\system32;c:\foobar...