Questions tagged [windows-batch]

6 questions
0
votes
1 answer

How to append into next line in Windows batch file

I am using a windows batch file that will output a .js file into csv. The .js file is a mongo query. mongosh --host 10.1.0.1:27017 --username "username" --password "password" --authenticationDatabase admin --quiet C:\ActiveUsers1.js >…
JRA
  • 3
  • 2
0
votes
1 answer

How can I redirect the output of one command in a batch file?

Edit: This question has been answered, please scroll down ⬇️ This question is related to Server Fault because I am automating minifying some web files before deploying them to my server. So I have a batchfile which calls minify like this: minify…
0
votes
1 answer

Exit safe mode remotely

I rebooted a Windows 10 machine into 'Safe Mode with Networking'. It is a physical machine that resides on-site (at a remote location) and does not have ILO (or similar features). I need to exit from safe mode from that machine. I tried the below…
0
votes
1 answer

windows bat needs to determine the version of the msql odbc library

Hi I need to build a bat possible power shell on standard windows 10 instance. I need a programmatic way to set an environment variable with the version string of the latest msodbcsql library at https://packages.microsoft.com/rhel/8/prod/ the…
peter cooke
  • 213
  • 1
  • 8
0
votes
1 answer

Delete all folders on all drives with "foo" OR "bar" in the folder name with batchfile

I am trying to delete all folders on all drives with the above naming pattern, however only on the first folder level, i.e directly below the drive letter, like for example: F:\this folder's name contains FOO and should be deleted ...without…
David.P
  • 119
  • 5
0
votes
1 answer

Windows Batch: Command FOR /F and Tokens, How can I ser variable from token X until end of the line?

Ok, I been struggling with this for days now. I have a little complex script but at the end I just need to set a variable from a Token 4 to the end of the line. Basically I run a command and the output has some words in the beginning that I don't…
DefToneR
  • 461
  • 5
  • 12