I think you want NUL
, at least within a command prompt or batch files.
For example:
type c:\autoexec.bat > NUL
doesn’t create a file.
(I believe the same is true if you try to create a file programmatically, but I haven’t tried it.)
In PowerShell, you want $null
:
echo 1 > $null
More Related Contents:
- Batch file v PowerShell script
- Using the “start” command with parameters passed to the started program
- PowerShell difference between Write-Host and Write-Output?
- Jenkins : Selenium GUI tests are not visible on Windows
- How to get list of arguments?
- How to run .sh on Windows Command Prompt?
- Run cURL commands from Windows console
- How can I uninstall an application using PowerShell?
- Git for Windows: .bashrc or equivalent configuration files for Git Bash shell
- How to make git ignore changes in case?
- File paths in Windows environment not case sensitive?
- How do I make my Perl scripts act like normal programs on Windows?
- MessageDialog ShowAsync throws accessdenied exception on second dialog
- Windows PowerShell: changing the command prompt
- How can I debug a .BAT script?
- Programmatically change screen resolution?
- Dealing with quotes in Windows batch scripts
- Difference between $? and $LastExitCode in PowerShell
- How to set “Run this program as an administrator” programmatically
- Can I send some text to the STDIN of an active process under Windows?
- Windows 7 – ‘make’ is not recognized as an internal or external command, operable program or batch file
- how do I clone files with colons in the filename
- Keyboard shortcut to paste clipboard content into command prompt window (Win XP) [closed]
- Visual studio code terminal, how to run a command with administrator rights?
- Where can I download precompiled GTK+ 3 binaries or windows installer? [closed]
- Git fatal: remote end hung up
- How can my app find the sender of a windows message?
- Is there a Windows/MSVC equivalent to the -rpath linker flag?
- Why does my Qt 4.5 app open a console window under Windows?
- Run batch file in Windows Installer Commit