Questions tagged [windows-command-prompt]

Refers to the default CLI that ships with all versions of Windows, often shortened to just "command prompt" or cmd (after the file name of the executable).

Refers to the default CLI that ships with all versions of Windows, often shortened to just "command prompt" or cmd (after the file name of the executable).

383 questions
2
votes
3 answers

Using a for loop in Microsoft cmd.exe, how can I process only the files with a certain extension?

I have a the folder c:\test\ and two files in it a.txt and b.txtv. I would like to process just the files with extension equal to .txt. If I write this commands cd c:\test for %f in (*.txt) do echo %f I will get the result where both a.txt and…
2
votes
2 answers

CMD - Rename Local Computer, Join Domain, Join Specific OU

Alright so not sure if this is entirely possible all in one. Situation: Brand new computer not on the domain, just a local workgroup. Want to change that computers name, join a domain, and put the computer name in a specific workgroup for that…
toups
  • 131
  • 1
  • 6
2
votes
1 answer

Ping returns "ip no resources"

One of my clients networks keeps losing connectivity, either the network or the PC they are trying to connect to. I am running a ping from the PC to the router which runs fine most of the time and occasionally returns: Reply from 192.168.1.254…
Lee
  • 123
  • 1
  • 1
  • 6
2
votes
1 answer

Zip for Windows Server 2008 command line?

I know that this has been asked before, but I have not found an answer for Windows Server 2008. Most references I found are with the Windows Server 2003 Resource Kit, but not for 2008. I know that there are 3rd party tools, but since there is a…
Remy
  • 117
  • 2
  • 3
  • 12
2
votes
1 answer

Delete all files' prefixes with windows cmd

I have a bunch of files with the same prefix "prefix_filename.txt". I want to remove this prefix and underscore from all filenames, how can I do this?
Sergey
  • 121
  • 1
  • 3
2
votes
1 answer

get windows file modification time

Under Windows, running 'DIR' in the command prompt shows a file's last modified time to the nearest minute. For example: 17.10.2011 14:55 115 638 pgstat.stat How do I get more accurate results?
Tair
  • 276
  • 3
  • 10
2
votes
2 answers

Passing CMD via PSEXEC to a remote computer via .BAT file

Using PSEXEC to call CMD for a DEL command on a remote computer through a batch script. PSEXEC \\hostname -u username -p password CMD /C DEL /Q /F C:\Folder\File.txt The script pauses with a new CMD window popped up connected to the remote…
2
votes
1 answer

Create self extracting (.exe) zip from the command line

Trying to automate a manual procedure in place currently. This is on a Windows 2008 server. Is there a method to create a self extracting (.exe) zip file from a commandline/batch file?
Martin
  • 572
  • 4
  • 14
  • 26
2
votes
1 answer

Convert .cmd file into Windows Service - 1053 Error

I have a file "init.cmd" which has the following commands inside it: set APP_ROOT=c:/wamp/www/myproj ringo -b %APP_ROOT%/bin/init.js %APP_ROOT%/app/main.js The file works fine when run from the command line, but I'd like to turn it into a Windows…
Scott Klarenbach
  • 569
  • 2
  • 8
  • 20
2
votes
2 answers

Recursive CMD or BAT Windows Script

How can I create a BAT or CMD which will iterate through a folder tree and run same command agaists each folder file? E.g myexe.exe C:\Documents and Settings\folder1\filename.txt myexe.exe C:\Documents and Settings\folder2\filename.txt Notes: The…
2
votes
5 answers

windows cmd shell environments

I use it regularly (cmd), but let's be frank, its environment sucks. No tabs, resizing the window is a pain, ... and so on. Console2 and PowerCmd fix some of these problems. But still, I'd love to know are there any other environments for cmd…
Rook
  • 671
  • 6
  • 15
2
votes
1 answer

Vista cmd shell thinks it's Windows Server 2008 DEBUG

Never seen this before - My vista cmd shell started displaying everything in yellow and outputs the following as soon as I start it: Setting SDK relative to C:/Program Files/Microsoft SDK/Windows/v6.1 . Targeting Windows Server 2008 x86 DEBUG Any…
2
votes
1 answer

PS Stop-Process fails to stop a subprocess launched from cmd.exe

Preface: I've boiled down a problem I'm having to this simple reproduction, which admittedly looks pretty strange out of context. From powershell (PS), if I use Start-Process to start notepad and capture the process ID, I can kill it with…
2
votes
1 answer

Event ID 1000 Application Error cmd.exe kernelbase.dll

I've come across a re-occuring error in the event logs of my Windows 2012 R2 Hyper-V server. The error event is shown below. Error 16/12/2020 15:47:31 Application Error 1000 (100) Faulting application name: CMD.exe, version: 6.3.9600.17415,…
2
votes
2 answers

Delete all files within a directory within a specific subfolder

I have seen and tried a few solutions online but these don't seem to be working. I don't need a recursive function. Basically I have a directory with numerous subfolders which all have subfolders of name "leaf", I wish to remove all files within…
Amy Rose
  • 21
  • 2