Hot answers tagged

3 votes

merge 3 txt files with custom format

Yes, it is possible to merge the three files into the format you described. You can use a simple script to do this. Here is an example of how you could do it in Python: # Open the first file in read ...
  • 46
2 votes

Capture batch output and save it in TXT File as log

UPDATED RESPONSE The batch file becomes: PowerShell.exe -ExecutionPolicy Bypass -File %~dp0Check.ps1 pause And, using Tee-Output which takes the output of the previous command in the pipeline and ...
1 vote

Batch Rename - Parent folder + text + Incrementing Number per directory

Please se if this is like expected: You have to drag and drop the parent folder to the batch file... @echo off if exist "%~1" (if not exist "%~1\" exit) else (exit) set Parent=%~...
1 vote

Prevent any batch file from closing automatically

You can install a program from Sysinternals Suite called Autoruns. It will list everything that is being started during logon so you can inspect the scripts and delete what you find malicious. Trying ...
  • 842
1 vote

Changing output file name in a batch file

Is there an easy way remove the last 4 characters of %~n1? You need to use the substring operator. Try the following cmd script: @echo off rem avoid polluting global environment space setlocal set &...
  • 147k
1 vote

Redirecting the output to a file and command prompt simultaneously

As per my comment, you are mixing syntax improperly. %~dp0 not any PowerShell will understand. The PowerShell equivalent of that is... $PSScriptRoot Also, You are trying to run batch/cmd ...
  • 4,295
1 vote

How can I make txt files with some script with Batch files?

If your question is about creating a multi-line text-file in batch with special characters, you may uses the append operator >> and the escape operator ^, like this : echo ^<...
  • 424k

Only top scored, non community-wiki answers of a minimum length are eligible