python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
Creating a .txt file with multiple echoed lines of text fails depending on the text
I'm a casual coder trying to make a bat file that writes a txt file with multiple lines of text and it's not working for some reason.
My code so far for reference:
@echo off
(
Echo;extends "re...

TheLemon27
Votes: 0
Answers: 2
Why does a batch file fail to start an executable with RUNAS a different user, but works on starting it from Windows shell?
I have a .bat file that should start a service as a different user. The different user account has administrator privileges.
Here's the kicker, when I perform Shift + Right-click on the service .exe f...
Troy
Votes: 0
Answers: 0
Make a txt for each folder without space at the end of the filename
Here is my code:
@echo OFF
for /d %%D in (*) do @echo %%~nxD >>List.txt
@ECHO ON
SET FileList=List.txt
FOR /F "TOKENS=*" %%F IN (%FileList%) DO (
ECHO ^0>"%%~F.txt"
)
...
Alfred Graton
Votes: 0
Answers: 0
Iterate files by extension and substring search
I have this code
for /R "C:\myfiles" %%i in (*super*.ts) do (
echo %%i
)
so I want to iterate over all files in the folder C:\myfiles which have in the path super and end with .ts. e.g.
&qu...

Impostor
Votes: 0
Answers: 2