Questions tagged [windows]

Writing software specific to the Microsoft Windows operating system: APIs, behaviors, etc. GENERAL WINDOWS SUPPORT IS OFF-TOPIC. Support questions may be asked on https://superuser.com

General support questions for Windows should be asked on Super User

Windows is a family of graphical operating systems developed by Microsoft for server, client, and mobile platforms.

Recent Versions

  • Windows 10 was released on July 29, 2015.

  • Windows 8.1, the first major update to Windows 8, was released on October 17, 2013.

  • Windows 8, the successor to Windows 7, was released to the market on October 26, 2012. It was designed to be used on both tablets and conventional PCs.

Specific Version Tags

If your question relates to using Windows APIs or Windows-specific behavior with a particular version of Windows, use the tag for that particular version – for example:

Other Related Tags

Resources

150194 questions
616
votes
22 answers

How do I install and use cURL on Windows?

I am having trouble getting cURL to run on Windows. I have downloaded a cURL zip file from here, but it seems to contain source code, not an executable. Do I need to compile cURL to run it? If yes, then how do I do that? Where can I find .exe…
pri_dev
  • 10,215
  • 15
  • 65
  • 118
601
votes
29 answers

How can I update npm on Windows?

I tried this: sudo npm cache clean -f sudo npm install -g n sudo n stable ...but it didn't work. How do I do this on Windows?
Jatin
  • 13,582
  • 14
  • 46
  • 73
589
votes
14 answers

How do I uninstall a Windows service if the files do not exist anymore?

How do I uninstall a .NET Windows Service, if the service files does not exists anymore? I installed a .NET Windows Service using InstallUtil. I have since deleted the files but forgot to run InstallUtil /u first. So the service is still listed in…
Thomas Jespersen
  • 11,101
  • 12
  • 43
  • 54
586
votes
34 answers

How can I set up an editor to work with Git on Windows?

I'm trying out Git on Windows. I got to the point of trying "git commit" and I got this error: Terminal is dumb but no VISUAL nor EDITOR defined. Please supply the message using either -m or -F option. So I figured out I need to have an…
Patrick McElhaney
  • 52,844
  • 37
  • 123
  • 157
576
votes
18 answers

Adding a directory to the PATH environment variable in Windows

I am trying to add C:\xampp\php to my system PATH environment variable in Windows. I have already added it using the Environment Variables dialog box. But when I type into my console: C:\>path it doesn't show the new C:\xampp\php…
Netorica
  • 16,405
  • 16
  • 70
  • 105
569
votes
29 answers

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 of the regional settings issue with using date. See @npocmaka's…
Rory
  • 36,412
  • 47
  • 153
  • 230
563
votes
21 answers

"rm -rf" equivalent for Windows?

I need a way to recursively delete a folder and its children. Is there a prebuilt tool for this, or do I need to write one? DEL /S doesn't delete directories. DELTREE was removed from Windows 2000+
FlySwat
  • 160,042
  • 69
  • 241
  • 308
560
votes
17 answers

How can I update the current line in a C# Windows Console App?

When building a Windows Console App in C#, is it possible to write to the console without having to extend a current line or go to a new line? For example, if I want to show a percentage representing how close a process is to completion, I'd just…
IVR Avenger
  • 13,266
  • 12
  • 42
  • 55
558
votes
17 answers

How to prevent auto-closing of console after the execution of batch file

What command can I put at the end of a batch file to prevent auto-closing of the console after the execution of the file?
joe
  • 15,556
  • 35
  • 90
  • 129
544
votes
31 answers

How do I measure execution time of a command on the Windows command line?

Is there a built-in way to measure execution time of a command on the Windows command line?
Kuroki Kaze
  • 7,142
  • 3
  • 34
  • 48
542
votes
24 answers

Is there a command to refresh environment variables from the command prompt in Windows?

If I modify or add an environment variable I have to restart the command prompt. Is there a command I could execute that would do this without restarting CMD?
Eric Schoonover
  • 44,080
  • 43
  • 148
  • 200
541
votes
34 answers

How can I create an empty file at the command line in Windows?

How can I create an empty file at the DOS/Windows command-line? I tried: copy nul > file.txt But it always displays that a file was copied. Is there another method in the standard cmd? It should be a method that does not require the touch command…
Grendler
  • 5,577
  • 3
  • 14
  • 8
529
votes
27 answers

How can you find and replace text in a file using the Windows command-line environment?

I am writing a batch file script using Windows command-line environment and want to change each occurrence of some text in a file (ex. "FOO") with another (ex. "BAR"). What is the simplest way to do that? Any built in functions?
Ray
  • 169,974
  • 95
  • 213
  • 200
527
votes
10 answers

CSV file written with Python has blank lines between each row

import csv with open('thefile.csv', 'rb') as f: data = list(csv.reader(f)) import collections counter = collections.defaultdict(int) for row in data: counter[row[10]] += 1 with open('/pythonwork/thefile_subset11.csv', 'w') as…
Alex Gordon
  • 51,480
  • 273
  • 609
  • 976
498
votes
3 answers

How to check if a file exists from inside a batch file

I need to run a utility only if a certain file exists. How do I do this in Windows batch?
sab
  • 8,917
  • 11
  • 38
  • 48