batch-file Questions
8
Solved
I have a bat script that I'd like to make work on windows/Mac/linux, but I read .bat is only for windows. How can I make this script work on Mac and linux, or what type of script can I write that w...
Sturgeon asked 16/11, 2011 at 18:50
5
Solved
When trying to open vscode folder using a batch file, Visual Studio opens up with that folder, but also a cmd window pops up and does not go away if you use exit command.
@echo off
start code "C:\...
Holston asked 22/6, 2019 at 0:43
5
Solved
I'm attempting to force a VM to log the current user out and send the session to the console via running a .bat script.
I can get this working if I manually run a .bat file on the VM which contain...
Elsey asked 11/7, 2016 at 14:55
3
How do I use the SET command in windows for floating point arithmatic. /A stands for arithmetic and %VAR% prints the data of VAR not the name.
For example when I do:
SET /A VAR="2.5+3.1"
ECHO %VA...
Stormy asked 20/9, 2014 at 16:59
4
Solved
I'm using Ubuntu and Windows on the same machine, and always have problem with incorrect time when booting into Windows, so I like to execute w32tm /resync at startup.
So I'm trying to put this co...
Internationalize asked 12/4, 2014 at 23:35
4
Solved
In Linux we can do
echo -n -e '\x66\x6f\x6f' > test.txt
to write HEX values to a file.
How can this be done simply in Windows batch?
Yolande asked 11/12, 2017 at 10:21
2
The following will print the current data and time within a windows batch file:
for /f "tokens=2,3,4,5,6 usebackq delims=:/ " %%a in ('%date% %time%') do echo %%c-%%a-%%b %%d%%e
I found ...
Gamages asked 28/6, 2015 at 12:30
4
Solved
I have a windows batch file that does this:
for %%s in (*.sql) do call
It loops through all the sql script in a folder.
In the folder the file names are like:
s4.06.01.sql
s4.07.01.sql
s4.08.01....
Lobworm asked 31/8, 2010 at 6:22
3
Solved
I have a code that I am writing that can change the screen brightness according to user input, but this is based around the current screen brightness. Is there a way to obtain the screen brightness...
Mortality asked 15/5, 2019 at 12:43
3
I have a fairly good amount of knowledge with Batch. I'm trying to port a batch script over to Mac/UNIX, but my batch file has a drag-and-drop thing to it. Through countless Google searches, I have...
Tribute asked 27/4, 2013 at 23:19
2
How do I echo the "greater than" character in cmd? I would like to escape the "greater than" sign (>) because I need it to echo to another .bat file.
Echo net session>nul ...
Fenrir asked 8/8, 2021 at 6:41
6
Solved
I'm working on a program which generates the day's weather for D&D games. I want the program to display a warning in red text when a storm is generated so the DM is aware that this weather is n...
Franchescafranchise asked 9/2, 2014 at 14:26
4
Solved
I have two batch files, task.bat and runtask.bat. The runtask.batcalls task.batand I would like runtask.bat to get the exit code of task.bat into a variable. How could this be done?
task.bat:
@ec...
Medeah asked 11/1, 2013 at 11:47
3
I need to have a timeout in powershell code where I'm running batch file, in case the batch file runs for a longer time or gets stuck. I also have a timeout in the batch script timeout 300> nul ...
Pulsation asked 18/12, 2022 at 16:35
3
Solved
I have the following batch file
@echo off
setlocal EnableDelayedExpansion
for /f "delims==" %%J in (File_List.txt) do (
call :setDate %%J MYD
echo/Date is: %MYD%
)
endlocal &goto :eof
:setDat...
Lecher asked 10/7, 2012 at 17:52
4
Solved
I am trying to download a Google sheet via a batch file. This works:
powershell -Command "Invoke-WebRequest https://docs.google.com/spreadsheets/d/SPREADSHEET_ID/export?exportFormat=tsv -OutFile o...
Kemme asked 28/2, 2019 at 1:40
7
Solved
I've more than 200 MP3 files and I need to split each one of them by using silence detection. I tried Audacity and WavePad but they do not have batch processes and it's very slow to make them one b...
Reposit asked 5/8, 2017 at 22:46
3
Solved
I'm writing a script that will run from the Task Scheduler. It's not executing correctly from the Scheduler, but will execute correctly from the command line. (Possibly a permissions issue?) I want...
Tyrothricin asked 16/11, 2011 at 19:53
6
Solved
What's the easiest/best way to find and remove empty (zero-byte) files using only tools native to Mac OS X?
Boorer asked 13/2, 2009 at 1:45
12
Solved
How can I pass more than nine parameters to bach file.
I tried another SO question
How do you utilize more than 9 arguments when calling a label in a CMD batch-script?
but not working for me.
I a...
Celanese asked 11/2, 2014 at 6:37
10
I am trying to schedule a job to run a batch file with Windows 10 Task Scheduler, but it results in return code 2147942401.
The batch file is on remote location so I am giving the absolute path
"\...
Millenary asked 19/1, 2018 at 15:5
7
Solved
I am using Runtime.getRuntime().exec() command to start a batch file which in turn starts another process for windows platform.
javaw.exe(Process1)
|___xyz.bat(Process2)
|___javaw.exe(Process3)
...
Drainage asked 12/4, 2012 at 13:12
10
Solved
I have found numerous ways to base64 encode whole files using the command-line on Windows, but I can't seem to find a simple way to batch encode just a "string" using a command-line utility.
How d...
Stunt asked 5/5, 2016 at 9:15
8
I am trying to use this GUI mod for a Minecraft Server. I wrote a batch file so the server can start with more RAM. When I run just the .jar file, no command window opens and it runs just fine (of ...
Glockenspiel asked 19/4, 2011 at 2:8
11
Solved
I want to build my application with the function to restart itself. I found on codeproject
ProcessStartInfo Info=new ProcessStartInfo();
Info.Arguments="/C choice /C Y /N /D Y /T 3 & Del "+
A...
Cyrie asked 7/3, 2012 at 15:7
1 Next >
© 2022 - 2024 — McMap. All rights reserved.