Top "Cmd" questions

Command Prompt (executable name cmd.

How do I get current date/time on the Windows command line in a suitable format for usage in a file/folder name?

Update: Now that it's 2016 I'd use PowerShell for this unless there's a really compelling backwards-compatible reason for it, particularly because …

windows datetime batch-file cmd
How to "comment-out" (add comment) in a batch/cmd?

I have a batch file that runs several python scripts that do table modifications. I want to have users comment …

batch-file cmd comments comment-conventions
How do I kill the process currently using a port on localhost in Windows?

How can I remove the current process/application which is already assigned to a port? For example: localhost:8080

windows cmd localhost port command-prompt
Batch file to delete files older than N days

I am looking for a way to delete all files older than 7 days in a batch file. I've searched around …

windows date batch-file file-io cmd
How to create an empty file at the command line in Windows?

How to create an empty file at the DOS/Windows command-line? I tried: copy nul > file.txt but it …

windows file cmd command-line
How to delete files/subfolders in a specific directory at the command prompt in Windows

Say, there is a variable called %pathtofolder%, as it makes it clear it is a full path of a folder. …

windows batch-file file-io cmd directory
How do I run two commands in one line in Windows CMD?

I want to run two commands in a Windows CMD console. In Linux I would do it like this touch …

windows batch-file command-line cmd
How to run multiple .BAT files within a .BAT file

I'm trying to get my commit-build.bat to execute other .BAT files as part of our build process. Content of …

batch-file cmd
Stop and Start a service via batch or cmd file?

How can I script a bat or cmd to stop and start a service reliably with error checking (or let …

windows command-line batch-file cmd
How can I open a cmd window in a specific location?

How can I open a cmd window in a specific location without having to navigate all the way to the …

windows cmd