Text file containing a sequence of commands or program invocations.

learn more… | top users | synonyms (1)

2
votes
2answers
35 views

Nesting IF in Windows Bat file

I am having some difficulty in understanding how the Nested IF works in windows .bat script. What I wish to achieve is as follows. I shall be passing two parameters to a bat file IF first parameter = ...
1
vote
0answers
42 views

How can I reproduce linux's `column -t` command equivalent in windows?

What is the equivalent command for Linux's column command in windows? How can I reproduce column -t in windows? I cant find anything related on windows batch file commands list. any help is greatly ...
0
votes
1answer
75 views

Parsing a string variable in a batch file for LAPS / ADU&C

I am trying to implement LAPS (Local Admin Password Solution) on our network and I am having issues integrating LAPS with the ADU&C right-click context menu. My goal is for our Helpdesk staff to ...
0
votes
0answers
59 views

Run a batch as domain admin during logon of user using GPO

I am creating an installer command. I have it fine tuned and working well. There is one catch, needing admin privileges to do some folder copies. I'd like to run my batch file as administrator (...
1
vote
1answer
72 views

Using runas to execute a minimized application

How can I run an application as another user and have that application's window minimized. Unfortunately, that application has no preference setting to have it start minimized. runas /savecred /user:...
1
vote
1answer
24 views

Batch script to create folder with first 2 characters in which to create config ini files

I have the following code in my batch, which I want to read the lines in test.txt, create a folder with the first 2 Characters and make config ini files for the respective items in their intented ...
3
votes
3answers
158 views

How to detect DVD drive letter via BATCH file in MS WIndows 7?

How to detect DVD drive letter via BATCH file in MS WIndows 7? I mean, I need to know that DVD could have assigned letter D or E... Is there any script to do it?
0
votes
1answer
115 views

How to output net group command in list format in batch

I'm using the net group "Groupname" /domain command which outputs a bunch of users in the group in the format of 3 columns. There are spaces between the columns. How do I output the command so that ...
0
votes
1answer
37 views

Issues with batch file to upload to FTP

I have currently created a .bat file to run a ftp command to upload documents to different locations. I need to have a lag time to ensure a response is received confirming data was posted successfully ...
0
votes
1answer
31 views

Unable to run the batch file for phoronix-test-suite in WindowsXP

I am trying to install phoronix-test-suite in my windows-XP, 64bit. According to the user manual, I only need to run a .bat file from respective directory. When I double click on the .bat file or ...
0
votes
1answer
34 views

How to give “yes” while running an application via batchfile?

I want to run an application via batch file. it asks me to enter yes for 6 times. how I can do that in batch file.
0
votes
1answer
54 views

How to start a server via Jenkins without outputting the server trace in the Jenkins console?

I have written a windows batch script to start an apache tomcat server via Jenkins. When the server starts to run, server trace is shown in the Jenkins console. But all on a sudden the window of the ...
-4
votes
1answer
50 views

Need bat file to randomly move 30 photos from a folder to another

I have a folder "C:\TEST\Clean" with many photos (let's say 436) and I have to move 30 of them to the folder "C:\Dropbox\Apps\AutoPost\For_Post_1". I have this so far but it's for 1 file and I need ...
1
vote
1answer
116 views

Stopping a scheduled task with a batch file action doesn't stop the program running in the batch file

I have several scheduled tasks that each execute a (different) batch file. Each batch file calls into the same program, with with separate command line arguments. If I Stop a task while it's running, ...
1
vote
0answers
101 views

Match lines from a text file (image listing) in SPECIFIED order using batch, JScript (JREPL ?) or VBScript?

The environment is WindowsXP (possibly upgrading to Windows7 soon). I am allowed to run scripts but NOT allowed to install tools. TASK: Output matched lines from a Log.txt file in same order as ...
0
votes
1answer
156 views

youtube-dl doesn't work with .bat files

I wanna handle my youtube downloading with a .bat file, like so: youtube-dl -o path\%(title)s.%(ext)s --audio-format best -x ^ url and it works just fine in the cmd, but when I put it in a .bat and ...
1
vote
1answer
405 views

Batch command to open url and fulfill username and password

I'm currently opening a local url from batch command (.bat file) like this: @echo off start /d "C:\Program Files\Internet Explorer" IEXPLORE.EXE http://some_local_address:88 This is working fine. ...
0
votes
1answer
151 views

PowerShell & Batch Files With User Input

OK first a thanks to nex84 for answering my last question and all those that gave input as well at this link http://superuser.com/a/1051727/569550... I now have a new question but it ties with the ...
0
votes
1answer
38 views

Batch Download Picture

Why isn't this code working? :downloadPicture bitsadmin /transfer downloadPicture /download /priority normal https://www.planwallpaper.com/static/images/foggygoldengatebridge.jpg C:\Users\%...
3
votes
1answer
33 views

How to go through a list of installed programs and take out any line with Microsoft-related strings?

This is on Windows 7 using command line and batch files. I was looking to examine my program list and uninstall a good amount of junk and update a good amount of outdated programs. I used a wmic ...
0
votes
1answer
129 views

Kill process based upon path to image

I've inherited an environment in which two different processes use identical names but their executable files are stored in different file paths. None, one, the other, or both may be running at any ...
1
vote
1answer
69 views

How can I remove similar lines from a text file (image listing) using batch, Jscript (JREPL ?) or vBScript?

The environment is WindowsXP (possibly upgrading to Windows7 soon). I am allowed to run scripts but NOT allowed to install tools. Pure batch has generally failed due to performance issues or 'special'...
0
votes
1answer
30 views

Why is my .bat file doing a infinit loop?

I've created a .bat file for running my cwRsync script. From CMD line, this works great: rsync -avz ./ {destination} --chmod=ugo=rwX --rsh "ssh -i id_rsync -p 9672" --recursive --delete Now, If ...
-1
votes
2answers
68 views

How To Run A Complex .bat file

I am running a Minecraft server from Windows, and the .jar that starts the file is located at C:\Users\David\Server\bin\pw\prok\KCauldron\1.7.10-1614.200\KCauldron-1.7.10-1614.200.jar What I do to ...
4
votes
1answer
55 views

Why is the “set /p”-method used in a batch script to read the first line of a text file not working in the body of a “for”-loop?

I tried to apply the answer given by Spaceballs to this question within the body of a for-loop. example.bat: @echo off copy NUL %1 echo firstLine >> %1 echo /=======================/ for /l %...
0
votes
1answer
72 views

Batch convert flv to mkv with mkvmerge

I have a bunch of *.flv videos in a folder on my Windows computer that I would like to convert (or remux) to *.mkv. Since I have a lot of files I would like to automate this process with a batch ...
2
votes
0answers
47 views

How to get the PID of the windows cmd I'm in

I want to create a unique directory for the time a process runs (to complete the copy process I described in this question). I've tried %random% but it changes too slowly. Waiting is not a viable ...
0
votes
4answers
191 views

Executing a powershell script through batch file

I am trying to execute a powershell script through a batch file, at the moment I am only testing this to get it running so the .ps1 file is simply a hello world script. This ALMOST works fine except ...
3
votes
1answer
68 views

Drive letter of given file in windows batch

I'm writing a script where I will get a file name as a parameter. The file will be absolute. (Ideally the solution would support relative files as well, but I can live with absolute-only). It is ...
0
votes
0answers
20 views

How to create new folder based on the copied text

it's my first question here on the website. i'm asking about create new folder based on the current copied text. in my work, i'm creating like 100 folder per hour for each file, and each folder must ...
0
votes
0answers
7 views

iMac 10.9.5 directory file names

I have a directory which contains files and folders. The folders contain a single pdf file. Each pdf file is named according to the following convention: DDDDD-LLL-LLLL-L-DDD - [random phrase of ...
0
votes
1answer
25 views

How to escape quotes in arg passed to program

So I have following problem. I have batch script script.bat having folowing content cat %* | gawk " { value = "something" } " Which obviously does not work. In bash, I would escape the quotes ...
0
votes
0answers
32 views

Batch - Schtasks Onstart Repeat Interval

Command I'm using: SCHTASKS /Create /SC ONSTART /TN "TaskName" /TR "path" /RU "user" /RP "pass" /RL HIGHEST I'd like to repeat this task every 10 minutes, which would be doable with the /RI flag, ...
0
votes
1answer
26 views

Marking / flagging files in a way that is visible to a windows batch file

I would like to construct an automated procedure for transferring files from my Windows desktop to a remote storage for backup. I envisage the automation being done by a Windows batch file. To ...
0
votes
1answer
27 views

Using WIndows 7 SR1

I work in a company that does net support for 20 different schools. While working on accounts I might log my "test" computer in 10 different domains in one day. After a few days a login goes from ...
1
vote
1answer
45 views

Disable/enable lan-device by batchfile: If comparisons not working

I have created this .bat-file which is invoked by clicking on the proper shortcut, which is configured properly. But the last two comparisons seem not to evaluate properly. Here we go. @ECHO off ...
1
vote
1answer
176 views

Create Bat File With Excel Data with VBA

I took some research from google Sub ExportRangetoFile() Dim wb As Workbook Dim saveFile As String Dim WorkRng As Range Set WorkRng = Sheets("Match").Range("K:K") Application....
1
vote
0answers
77 views

MSInfo32 command line switches and Windows 10 issue checking remote PC

I am trying to run MSInfo32 on a list of hostnames using the command line switches: for /F "tokens=*" %%A in (hosts.txt) do ( start /wait msinfo32 /nfo %%A /computer %%A ) It appears to work ...
3
votes
2answers
85 views

How to execute a program using wildcards in the path

I try to launch an .exe file in a very simple batch script. The problem I'm faced in is that I don't know the name of the target folder where the program is located cause it's suffixed by the ...
0
votes
0answers
37 views

How to run a task when a event is registered? (Windows XP)

Perhaps my question has already been answered, but I need my script run after Windows register any WiFi connection event. (The bat script reconnect a mapped drive only after there is a wifi connection)...
2
votes
1answer
53 views

How to quickly copy *specific multiple* files?

Say I have a list of filenames like these, file01.001 file02.abc fiAl.12x ect. All with full extensions. They are all in the main folder C:\ABC. Some files will be in subfolders or even in ...
1
vote
0answers
44 views

Notepad++ custom language how to only highlight if comment keyword has a space

In the custom language editor in Notepad++, I recreated the batch language syntax highlighting, as I saw it as poorly made. My issue is that in making a remark with rem, I cannot have words like ...
0
votes
1answer
148 views

Is there any way to add an HTTP Header to every IE request on a computer?

I would like to add a custom HTTP Header to every Internet Explorer request on a computer (or every browser request). I don't know if this is possible whatsoever, if you have heard of anyway to ...
2
votes
0answers
31 views

Can I prevent the change of overlay icons?

Background Several programs modifiy the icons in explorere to indicate a state ("synched" etc.) It is a known fact, that Windows (win7, win8, win10?) can only handle a limited amount of such icons ...
1
vote
1answer
79 views

How to set one password for all net users in cmd for batch script?

Im writing a windows batch script and I need to set all the users to a certain password? I know that I can do net user to see all users on the computer and I can do net user username password to set ...
1
vote
0answers
32 views

Bat script's remote path not working with “SET Profiles=\\%PC%\C$\Users”

@ECHO OFF :ProfilDeleter SET /P PC=Enter Remote Ip/HostName (for Exit press M): if [%PC%]==[] cls && @echo you should fill && goto ProfilDeleter if %PC%==m goto :Menu if %PC%==M goto :...
4
votes
1answer
73 views

How do I escape a certain character in a variable in a batch file

I made this script but it doesn't work : for /R %%f in (*.mkv) do ( ffmpeg -i "%%f" -vf subtitles="%%~nf.mkv" -acodec copy "%%~nf.mp4" ) PAUSE After looking for the problem, I found that the ...
0
votes
1answer
150 views

A task inside my windows task scheduler will cause my server to stop responding

I have the following AppPoolActivation.ps1 file, to call a URL :- [System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true} $request = [System.Net.WebRequest]::Create("https://...
0
votes
2answers
93 views

save username and password in batch file to log into putty is recommended?

Is it safe and secure to save username and password in a batch file and use it to connect to putty ? Batch file contains below command: start putty -ssh -load session -l username -pw password
0
votes
1answer
78 views

Command line (Windows) to update same xml file with trim

Currently I am using a curl command to grab data output to a text file and trim top 14 line away, convert the file to abc.xml @echo off call :sub >output.txt exit /b :sub c:\curl -X GET ...