Skip to main content

All Questions

Tagged with
0 votes
0 answers
22 views

“psloglist” for system event returns an error: -1073740940

My batch must extract system and application events. I use two psloglist (vers. 2.82) cmd one after the other. psloglist \\Home -d 7 -f we sys > system.log psloglist \\Home -d 7 -f we app > ...
Luciano's user avatar
  • 11
1 vote
1 answer
554 views

DOS batch file to display netsh channel output

I'm trying to get wifi Channel output from netsh command to be 2.4GHz or 5GHz The following provides me with Channel output: netsh wlan show interface name=Wi-Fi | findstr "Channel" Output ...
mnauta's user avatar
  • 11
1 vote
1 answer
173 views

How to discover the page code to show a specific character in MSDOS/Batch?

I made a batch-file snake game and inserted some special characters via HEX to ANSI conversion in Notepad++. It worked normally. But I noticed that there was an update to the Consolas font and two of ...
Zano's user avatar
  • 13
1 vote
2 answers
2k views

Why is change directory not working when SETLOCAL ENABLEDELAYEDEXPANSION is used

I have an existing windows batch script (named as test1.bat) as below : @echo off SETLOCAL ENABLEDELAYEDEXPANSION set nop=4 for /l %%z in (1, 1, %nop%) do ( set x=%%z echo !x! ) chdir /d D:\app\ ...
Shri's user avatar
  • 13
1 vote
1 answer
760 views

How do I download the RSS Feed XML file in dos command batch mode?

I have a specific requirement that I need to download the RSS feed file (it is in XML format) from the given link using dos command. I have tried the following command and it keeps giving me syntax ...
Manikandan Arunachalam's user avatar
1 vote
2 answers
1k views

How to read files name last character and and rename them by running a batch file

I have 3 files in a folder which are: XXX_a.txt XXX_b.txt XXX_c.txt The filename can be varied, only the last character of the 3 files a, b and c are not changed I need to rename the files as below: ...
newbie's user avatar
  • 13
3 votes
2 answers
1k views

batch file put if inside for loop error

I have a working for loop to print all zip file's name under one working directory: @echo off setlocal for %%i in (*.zip) do ( echo %%i ) I have another working if block to check and print ...
peterboston's user avatar
1 vote
2 answers
2k views

Running file from batch file

I am working in Windows 10. This is my code saved in .bat file: %windir%\System32\cmd.exe "/K" C:\Users\Alex\AppData\Local\Continuum\anaconda3\Scripts\activate.bat C:\Users\Alex\AppData\Local\...
vasili111's user avatar
  • 537
0 votes
1 answer
2k views

How to start Notepad++ from a Windows 10 batch file?

When I Google this, I get pages about running Notepad++ from the command line, running batch files from Notepad++, and pages that start by explaining how I set my path variable. I am not allowed to ...
rcook's user avatar
  • 207
0 votes
1 answer
830 views

How can I check if a file starting with a letter is in the folder?

Why does this script always return "A" even when there are no files starting with A in the folder, but there being files starting with B and C? @ECHO OFF if exist %cd%\a* goto A if exist %cd%\b* ...
relo999's user avatar
  • 21
0 votes
1 answer
38 views

Writing out to a file based off of the output of the command

I have seen many examples of how to create a file through command line using a static name but I need to get it to show a dynamic name based off of my commands output. What I mean by this is the ...
Danny's user avatar
  • 1
2 votes
1 answer
4k views

Log date and time accurately with batch file

I have a batch file that backups my files and works nicely, however I wanted to be able to log the exact time each task starts, but it is not working as I expected. @echo off > C:\log\%date:~3,2%-%...
Luis Esparza LeedMx's user avatar
0 votes
1 answer
261 views

*NIX getopt alike for DOS

I want to write a DOS script with multiple optional option flags. I have to parse these optional options. An example: get_resolution.bat /? get_resolution.bat /h input.jpg get_resoltion.bat /v ...
Francky Leyn's user avatar
2 votes
3 answers
2k views

Substring a variable with two percent in a .bat file

I faced a problem trying to implement a .bat file and I didn't find an answer. I try to display all folder names without the system path. I've tried something like that but it doesn't work. @echo ...
NicoFC34's user avatar
1 vote
0 answers
358 views

Create variable from file text in MS-DOS 6.22 batch file

This doesn't work, for example: set var=<text.txt It can be done like this in BASH: #!/bin/bash variable=$(cat text.txt) echo $variable
cronulis's user avatar

15 30 50 per page