tagged [cmd]

Iterate all files in a directory using a 'for' loop

Iterate all files in a directory using a 'for' loop How can I iterate over each file in a directory using a `for` loop? And how could I tell if a certain entry is a directory or if it's just a file?

23 Oct at 11:2

How to read input from console in a batch file?

How to read input from console in a batch file? How do I read input from the console in a batch file? What I am trying to achieve is the functionality of scanf in C. How can I do the same in a batch f...

5 Mar at 02:5

Open a Web Page in a Windows Batch FIle

Open a Web Page in a Windows Batch FIle I have a that does a bunch of things and at the end needs to to a page. Is there a way to, in essence, call `ShellExecute` on a to open the web page? Windows Co...

6 Oct at 20:39

Get CPU temperature in CMD/POWER Shell

Get CPU temperature in CMD/POWER Shell In my computer I am trying to get the CPU temperature. Searching on StackOverflow I found this: But I get this error:

28 Sep at 07:19

How to get folder path from file path with CMD

How to get folder path from file path with CMD I need path to the folder that contains cmd file. With `%0` I can get the file name. But how to get the folder name? P.S. My current directory != folder ...

21 Dec at 19:47

Execute a batch file on a remote PC using a batch file on local PC

Execute a batch file on a remote PC using a batch file on local PC I want to execute a batch file > D:\apache-tomcat-6.0.20\apache-tomcat-7.0.30\bin\shutdown.bat Which is on my server `inidsoasrv01`. ...

14 Mar at 15:38

How to test if a file is a directory in a batch script?

How to test if a file is a directory in a batch script? Is there any way to find out if a file is a directory? I have the file name in a variable. In Perl I can do this:

13 Mar at 21:44

Open two console windows from C#

Open two console windows from C# I can open cmd.exe with this command. But i can open only one console window and write in it. How can i open another one? Is any clean and fast solution for opening tw...

1 Aug at 14:30

Windows CMD command for accessing usb?

Windows CMD command for accessing usb? I have tried googling it but couldn't find it. I know the command for it is cd /media for linux but have no idea what it is for Windows.I also tried the dir comm...

20 Feb at 05:56

How to list files in windows using command prompt (cmd). I've tried using ' ls ' as in Linux but it shows an error?

How to list files in windows using command prompt (cmd). I've tried using ' ls ' as in Linux but it shows an error? When I tried to use list `ls` on a Windows command prompt, the system doesn't recogn...

22 Jun at 21:5

Replace or delete certain characters from filenames of all files in a folder

Replace or delete certain characters from filenames of all files in a folder How do I delete certain characters or replace certain characters with other characters by some batch file execution, for fi...

13 Jan at 00:20

How to capture Python interpreter's and/or CMD.EXE's output from a Python script?

How to capture Python interpreter's and/or CMD.EXE's output from a Python script? 1. Is it possible to capture Python interpreter's output from a Python script? 2. Is it possible to capture Windows CM...

24 Aug at 10:29

Is there any sed like utility for cmd.exe?

Is there any sed like utility for cmd.exe? I want to programmatically edit file content using windows command line ([cmd.exe](http://en.wikipedia.org/wiki/Windows_command_line)). In *nix there is [sed...

10 Feb at 17:12

How to use ADB Shell when Multiple Devices are connected? Fails with "error: more than one device and emulator"

How to use ADB Shell when Multiple Devices are connected? Fails with "error: more than one device and emulator" --- --- ---

5 Nov at 08:30

'touch' is not recognized as an internal or external command, operable program or batch file

'touch' is not recognized as an internal or external command, operable program or batch file I work with laravel 5 , when i type in windows cmd this command "touch storage\database.sqlite" this error ...

21 Mar at 09:8

Using multiple IF statements in a batch file

Using multiple IF statements in a batch file When using more than 1 IF statement, is there a special guideline that should be followed? Should they be grouped? Should I use parenthesis to wrap the com...

15 Jul at 18:29

Echo off but messages are displayed

Echo off but messages are displayed I turned off echo in bat file. then I do something like this and I get: > The system cannot find the path specified. message between those two echos. What can be th...

19 Sep at 16:57

How do I create a batch file timer to execute / call another batch throughout the day

How do I create a batch file timer to execute / call another batch throughout the day How do I create a batch file timer to execute / call another batch through out the day Maybe on given times to ru...

18 Nov at 17:18

How do I get the application exit code from a Windows command line?

How do I get the application exit code from a Windows command line? I am running a program and want to see what its return code is (since it returns different codes based on different errors). I know ...

What is the alternative for ~ (user's home directory) on Windows command prompt?

What is the alternative for ~ (user's home directory) on Windows command prompt? I'm trying to use the command prompt to move some files, I am used to the linux terminal where I use `~` to specify the...

13 Nov at 03:9

Using parameters in batch files at Windows command line

Using parameters in batch files at Windows command line In Windows, how do you access arguments passed when a batch file is run? For example, let's say I have a program named `hello.bat`. When I ente...

how to run python files in windows command prompt?

how to run python files in windows command prompt? I want to run a python file in my command prompt but it does nothing. These are the screen shots of my program i am testing with and the output the c...

Delete files or folder recursively on Windows CMD

Delete files or folder recursively on Windows CMD How do I delete files or folders recursively on Windows from the command line? I have found this solution where path we drive on the command line and ...

18 Sep at 19:11

The filename, directory name, or volume label syntax is incorrect inside batch

The filename, directory name, or volume label syntax is incorrect inside batch When I am running the following inside batch.... I get error "The filename, directory name, or volume label syntax is inc...

17 Jul at 11:23

How can I debug a .BAT script?

How can I debug a .BAT script? Is there a way to step through a .bat script? The thing is, I have a build script , which calls a lot of other scripts, and I would like to see what is the order in whic...

9 Jun at 12:41