cmd

next, previous parallel folder

I am trying to make a relative shortcut using a batchfile and a program to turn the batch in an exe program with an icon. I need a 'shortcut' to open the next alfabetic parallel folder in an explorer window and one to open the previous. Ideally I would even like it to to close the explorer window used to doubleclick it. I have so far: ...

script to map networkdrive base on username

I have a .cmd script I want to map a network drive based on the username of the person running it. So something like this net use K: \\nas001\users\[My_User_Name] Except replace [My_User_name] with the name of the user running the script. Is this possible? Thanks ...

Using cmd tools when hosting a site

Do webapp hosting sites such as webfaction.com support the use of cmd tools such as pdftk and pdftotext? For example, if in my django-powered site I do something like subprocess.Popen("pdftk.exe....") would this still work when I begin hosting the site? ...

Why doesn't "set -P" work after a pipe?

C:\>type c:\output.txt abcd C:\>type c:\output.txt | set /p V1= C:\>set ... A bunch of junk, NOT seeing "V1" What happened? According to all documentation for SET I've seen, %V1% should have been assigned a value of "abcd" from the above, no? I'm on Windows XP Pro, SP3 if it matters. ...

vbs cmd path space

Hi all, I would like to be able to call the following cmd command from within a vbs script: cmd Client\setupclient.exe /q /targetdir "c:\program files\Microsoft CRM" I came up with the following vbs script: Set oShell = WScript.CreateObject ("WScript.Shell") oShell.Run "cmd /c Client\setupclient.exe /q /targetdir c:\program files\M...

Windows command line, start/stop COM+

Is any ability to start/stop COM+ applications from the windows command line? If this ability exist how to do it? Thanks. ...

Trying compile a C Code with PHP

I have a file named gcc.exe and I have a php page... I want to use: gcc test.c And, if there's some compilation error, I want to show it on the php page... But I can't. What happens is: If the file is correct, it generates the .exe file, but if it's wrong, nothing happens. What I want here, again, is to show all errors. Anyone has an...

How do I programatically capture the output of a command on Windows

What the question says. Ultimately what I want is to execute gcc and capture the output if there's an error. The problem is errors are written to stderr instead of stdout. On Linux I can do gcc foo.c 2>&1 How can I accomplish this on Windows? ...

How to combine Cmd and Matplotlib in python

Hi there, I'd like to combine interactive plotting in Matplotlib and the Command line interface Cmd in python. How can I do this? Can I use threading? I tried the following: from cmd import Cmd import matplotlib.pylab as plt from threading import Thread class MyCmd(Cmd): def __init__(self): Cmd.__init__(self) self...

How do I get the day month and year from a Windows cmd.exe script?

How do I get the current day month and year from inside a Windows cmd script? I need to get each value into a separate variable. ...

i'm writing a wrapper for cmd but am having trouble with redirecting standard input

OK so here is what I'm doing -- I want to write a .net app that redirects standard out / in to a richtextbox. I've got it working pretty well, but once I add standard input into the mix my read commands freeze up. Here is the relevant code from within my form. Shell = new Process(); Shell.StartInfo.FileName = "cmd"; ...

Batch file to read ini

I am trying to automate editing the boot.ini depending on the partition XP loads from. This is a snippet of the batch I am working on. One minute it works and the next it fails. It doesn't always correctly read from the boot.ini Any suggestions ? @echo off find "multi(0)disk(0)rdisk(0)partition(1)\WINDOWS" boot.ini | sort /r | date ...

Message will prompt if he closes the program.

How will be the syntax in java if someone try to run a java program in a CMD then if he close the CMD, there will be a message or prevent the user to close the program. ...

how to run several .cmd files in parallel

Hi I have 4 .cmd files. I want to run then in parallel taking 2 at one time. say my files are : 1.cmd, 2.cmd, 3.cmd, 4.cmd i want to run 1.cmd and 2.cmd in parallel. Now when any of these ends , i want to run 3.cmd and then 4.cmd. In short, at any given time i want 2 of the .cmd files to run. I am using the Start command for parallel...

winrar not closing correctly?

hi gurus, I have this script that runs by a windows task scheduler once a week: for /f "delims==" %%D in ('DIR D:\scripts /A /B /S') do ( "C:\Program Files\WinRAR\WinRAR.EXE" a -agyyyy-MM-dd -r "c:\backup\scripts.rar" "%%D" ) by a bat file. My question is after this bat file runs and completes, I look in my windows task manager i sti...

Generating random string in command prompt

I want to be able to generate random strings from the windows command prompt. This is so that i can create a temp file with that random name so that i am sure that the temp file absolutely does not exist. Is this possible? ...

Reading empty values in "for" command in a windows batch file

I have a question with the "for" batch command in windows. I have a file called keys.txt which contains this line.. key,value,x86,windows7 I want to parse this line and store the 4 comma seperated variables in 4 variables. I accomplish that by the following windows batch script. for /F "tokens=1,2,3,4* delims=," %%i in (keys.tx...

Running a perl script in a batch file

Hi guys, i have a perl script that is used in updating my awstats logs of my website. The script works fine if i just paste it in cmd (Windows) but the moment i paste it in a batch file, it messes up the format of the files generated (they should be prepended with current date/time). The code is: perl C:\PROGRA~2\AWStats\tools\awstats_b...

Creating & Editing performance counters in a powershell script or command line

Hello, I'm trying to move the verification & creation of my performance counter groups, and the counters themselves, out of my web service and into a powershell script that's run during deployment. Can this be done? Or am I stuck using a simple app to build the groups & counters? Thanks much :) ...

Command Param for making console invisible

I am firing up a cmd console from my .net app with some parameters, is there a parameter to specify that the cmd console is not visible? ---- Edit - Adding Code I know this isn't the standard way of starting a process in .Net, but it is being run from a Silverlight Client. Dynamic cmd = AutomationFactory.CreateObject("WScript.Shell"...