cmd

How can you download a file/zip from the DOS commandline using putty?

I'm trying to write a batch script (CMD @ Windows XP Pro) that will automatically download and unzip packages with the help of 7zip and putty/psftp If I have a URL to a package to download http://somesite.org/packages/package.zip how do I download it on command line using putty? Also if you have a better way to do this that would be he...

Change Current Directory in Windows command environment

Seems it's not easy, I don't want to create a bat call an exe to do that. Is there a method to create a windows exe, that can change the current directory when it exit. ...

git log --pretty=oneline on win xp cmd

I just recently noticed this behaviour. To put it shortly, it displays the commits with an END on a white background, and gets stuck. Upon pressing "q" it asks if I wish to terminate the batch job ? Is anyone else experiencing this ? Is this a known bug, or ... ? ...

Using DOS/CMD/batch files how can you show Console output, and redirect the STDOUT and STDERR streams to files?

direct console to ok.log, and errors to error.log for example ...

Windows 7 Batch: Find /i

Hello, I have a windows batch file in Windows 7 which does something with find. it starts with this: find /i /c.... But it says something like find /i is no medium or so. Then it just gives a list of every single file in the C:\ directory. Is there any new replacement for Windows 7? EDIT: If i hit find /? in cmd, it gives fi...

Passing a shortcut to a batch script

My bat script accepts a filepath as a parameter, which allows me to drag-and-drop a file onto it from Explorer. Unfortunately when I drop a shortcut onto it, I simply get the filepath of the .lnk file itself, rather than the file that it refers to. Is there any way to derive the underlying filepath? I am looking for a native capability ...

Get number of pages in a pdf using a cmd batch file

I can see there are a lot of questions for getting the number of pages in a a pdf with c, PHP and others but am wondering with a batch file or cmd is there a simple way of getting hte number of pages? ...

How to redirect input in cmd

How i can redirect input for following command zip 1.zip file.txt i want the names to be ziped be taken from the file.txt file I tried to do zip 1.zip < file.txt and it didnt worked , i work under windows . thanks ...

How to get a list of binaries located in particular folder with their versions (using command line in Win XP) ?

I would like to get a list like below: a.dll 1.0.0 b.dll 1.0.1 c.dll 1.0.2 ...

multiple command executing in cmd?

I want to hide multiple files with the attrib <file path> +s +h but it stops after the first folder. I have this... @ech off attrib z:\test +s +h attrib C:\Documents and Settings\Administrator\Desktop\test +s +h Yes, I have two drives. But it stops execution after the first folder. How do I make it execute both commands. I know a...

Development Environment in Windows

What are your recommendations for setting up a development environment in Windows, especially when not using an IDE. I am attempting to familiarize myself with Windows, and I feel a bit lost. What do developers commonly work on, especially when developing in multiple languages (e.g. Java, Python, C) in the same time. So far, I have be...

How do I append to an environment variable in a batch file?

I don't know how to describe exactly what I'm trying to do but here's an example batch file that demonstrates what I can't figure out.: I've got a batch file. Inside that batch file I'm trying to create a directory: Set CopyFrom = %~dp0 if Exist "%ProgramFiles(x86)" ( Set TargetDir = %ProgramFiles(x86)%\My Directory Name has spaces...

How do I make Perl scripts recognize parameters in the Win32 cmd console?

When I invoke my Perl scripts in the Windows environment without invoking perl first, the parameters are not passed to my script. For example, C:\> C:\my-perl-scripts\foo.pl bar invokes foo.pl but doesn't recognize bar as a parameter (@ARGV is empty). However, C:\> perl C:\my-perl-scripts\foo.pl bar works as expected. Is this a ...

Get server IP of PPP VPN in Windows using VBScript or CMD

Hi all, Is it possible to use VBScript or commandline to grab the server IP of a PPP VPN under Windows? Note this is not VPN dialup server IP. ...

how to pass clipboard to batch in xp

using windows xp i want to copy text (url) to the clipboard then run a batch file that will use that url. i know the reverse is possible with the clip.exe floating around. ...

Windows Shell Script: Can't make string substitution working in subroutine...

Greetings dear Experts! Could you please advice me on how to cope with the problem: @echo off cls setlocal enabledelayedexpansion path=%CD%;%path% set NumberOfPages=553 rem set /A MaxFileIndex=%Counter% - 1 set MaxFileIndex=1 del Output.txt for /l %%i in (0,1,%MaxFileIndex%) do call :GenerateFileList %%i goto :eof :::::::::::::...

Why does Excel throw an exception on Quit when started from command line?

I have a simple Excel file that queries a database when it opens and then closes automatically. If I double click the file to open it from within Windows Explorer (I'm running Windows XP and Excel 2002), it works fine. However, if I run it using Excel "C:\DataUpdate.xls" from Start > Run or from Shell within another instance of Exc...

More lines in command window

Is there a possibility to get "more" lines into the command window (Console)? When I debug my programs I output quite a bunch of lines to the window and the beginning of the ouput keeps disappearing out of the range I can scroll back the window so I don't see my complete output from the beginning of the program. How can I get the comma...

How to input special character in cmd?

I have written a c program that retrieves arguments from the command line under Windows. One of the arguments is a regular expression. So I need to retrieve special characters such as "( , .", etc., but cmd.exe treats "(" as a special character. How could I input these special character? thanks. ...

Double click on CMD script in Vista does not execute script!!!

I am running Vista Home Premium. I tried to write a script to do some simple automation.... it does not work! even the most simple script like: @echo ON dir . does not get executed and only an empty CMD shell pops open. This is really weird and I have never seen this before (but wrote many CMD scripts before) ftype cmdfile and bat...