Questions tagged [batch-file]
A batch file is a text file containing a series of commands that are executed by the command interpreter on MS-DOS, IBM OS/2, or Microsoft Windows systems.
batch-file
51,957
questions
0
votes
0
answers
8
views
Get the list of nested folders in directory and filter by name in batch script
I am trying to write a batch function where i need exclude some folders while searching in directory
Main Folder
--ProjA Folder
--A Folder
--A.csproj
--Aa Folder
-Aa.csproj
...
0
votes
0
answers
26
views
how to run batch file on Mac [migrated]
I've been attempting to install a mod for Elden Ring on Mac, and it uses a batch file to install and launch. I can't seem to get it to run with wine, receiving these errors:
0074:err:ntoskrnl:...
0
votes
1
answer
33
views
How to use batch script to launch an Ubuntu terminal with commands for WSL Windows (cd & nvim)
I'm trying to use a batch script to run code files in Neovim inside the Ubuntu terminal, whenever I open a code file using the batch script as the app for Windows.
I can successfully run set "...
-1
votes
0
answers
18
views
Starting GUI application from Windows Service
I want to open an application and start the printing process from Windows Service. How to do this in java?
I tried using Scheduled tasks. But sometimes the tasks are not getting deleted after task ...
-1
votes
0
answers
28
views
Execute .jar from batch file, but not grouping icon in taskbar [closed]
Using an earlier java JRE version, if I started the jar file from a batch file, it automatically grouped the icons together on the taskbar. However, after updating the JRE, this function no longer ...
0
votes
1
answer
27
views
How to run a command using command line arguments for Windows Terminal using wt command?
I'm trying to setup my environment. The below code is working, I just need to execute "Code ." in the new tab opened. Tried doing -Command 'code .' , -c 'code .' , but no luck.
Here's my ...
0
votes
1
answer
59
views
Writing filenames into a string using a loop
For a project, i must have a batch script responsible for FTP file uploading.
For easier debuging / letting us know when a problem happens, if ftp upload is unsuccesful, i'd like to send a mail ...
0
votes
1
answer
34
views
How to delegate variable evaluation to the child CMD process in Windows command-line? [duplicate]
I am trying to delegate variable evaluation to the child CMD process in Windows command-line. Consider the following:
set foo=bar
cmd /c "set foo=rod & echo %foo%"
It prints bar and not ...
0
votes
0
answers
63
views
Why am I getting this error in Task Scheduler?
Goal of the program: Run (.bat) file that disconnects Tailscale when the computer is idle for over 1 minute.
Here's what I already have set up:
A (.bat) file that disconnects tailscale.
@echo off
&...
0
votes
3
answers
51
views
In batch (`.bat`), how do I set a variable to print multiple newlines?
From this other SO post, learned that
SET n=^&echo(
echo First line%n%%n%Second line
prints
First line
Second line
How do I define nn to print 2 new lines? The following didn't work
SET n=^&...
-2
votes
0
answers
35
views
How do I run an mp3 file from a batch file? [closed]
I need to run an mp3 file from a batch file. The mp3 is in the same folder as the batch file.
I have tried inserting the file location and also trying to see if theres a run file. Does anyone know ...
-1
votes
1
answer
50
views
How to parse accented file names in a batch file to open a file in a relative position?
I got a lot of use out of this answer, thank you so much. It works just fine, but what if I have accented characters in the target file name?
This works fine:
Target E:\GD\A\'Modernist Villa' (Malaga)...
1
vote
1
answer
47
views
How to echo out a line ending in a "=0" into a file
Using the batch file generator.bat:
REM Test file creator
SETLOCAL
ECHO Test generated file! >>testfile.txt
ECHO assign var1=0>>testfile.txt
ECHO assign var1=1>>testfile.txt
ECHO ...
0
votes
1
answer
44
views
How to create a RAR archive with increasing name using batch commands? [closed]
I want to create a rar archive with files from a directory, and if there is an existing archive with the same name, increase that name by 1. (If my have archive would have been named archive.rar, to ...
-2
votes
1
answer
61
views
How do I make a batch file ask for user input? [duplicate]
I'm trying to make a batch file-based game, and i want to be able to collect user input. It should be a bit like the pause command, but asks for input from the user.
I don't have much code yet, ...