About 2,540,000 results
Open links in new tab
  1. How does && work within a batch/cmd script? - Super User

    Dec 21, 2021 · cmd to powershell transition in batch-script. 2. Set not setting in CMD batch script. 0.

  2. What is the meaning of tilde ~ in batch variables?

    Jul 16, 2020 · The tilde (~) sign is used in different ways in batch files: Argument quote removal. A tilde sign before an command-line argument (such as "%~1") indicates to remove the surrounding quotes from the parameter.

  3. How do I make a batch file wait / sleep for some seconds?

    May 3, 2017 · I use a batch file to start up a few of the programs I need running in the background. Up until now, I had used the pause command to execute it after some of the other start-ups finished. I would prefer to use the wait or sleep commands but they do not appear to be included in Windows 7.

  4. How to extract part of a string in Windows batch file?

    May 10, 2018 · If you find that the batch language isn't powerful enough to do what you want - and it likely won't take you too long to get to that point - you can use the Windows PowerShell. This isn't installed by default on all versions of Windows, but you can download it free of charge. If you don't like the PowerShell language, there's Perl.

  5. Automatically run a script when I log on to Windows

    Jan 7, 2016 · The Windows Server 2003 family supports two scripting environments: the command processor runs files containing batch language commands, and Windows Script Host (WSH) runs files containing Microsoft Visual Basic Scripting Edition (VBScript) or Jscript commands. You can use a text editor to create logon scripts.

  6. windows - Log an entire batch file output - Super User

    Jul 29, 2021 · script 2>&1 | wtee logfile.txt) For this post, I will be using a small test batch file, but your script could be as big and complicated or as simple as you need: C:\>type a.cmd @echo off echo Command: "dir /b a*" dir /b a* echo. echo Command: "dir /b non-existant-file" dir /b non-existant-file echo. This is what happens when I run this batch ...

  7. windows - Add registry key entries using batch file - Super User

    The following lines will add the registry entries you are asking for. reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Server" /v DisplayName /t REG_SZ /d Server reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Server" /v DisplayVersion /t …

  8. Batch Script to Create Multiple Folders within Multiple Folders

    Sep 20, 2017 · I'm trying try create a folder structure of multiple folders within another folder. The names of the folders are separated by commas in a batch script loop. I now need to create another heap of subfolders but I need them to be beneath the first level subfolder that was created by the other list separated by commas folder names.

  9. Delete registry key or value via a CMD script? - Super User

    This is the text of a batch file, that is run from CMD or from a shortcut. It creates a registry file using simple echo redirections, then imports it. REM *** START REGISTRY SHREDDER *** ECHO CREATING MRU REGISTRY ECHO .

  10. windows - Batch script to launch an application - Super User

    Jul 7, 2010 · @Bobby method should work, If you directly calls the batch script ( double click ), the method will open a new command window. Instead use the following, @echo off start "C:\Program Files\Notepad++\notepad++.exe" blah.txt cls exit If you replace blah.txt with %1, then you should pass the argument when you call the batch file.