Text file containing a sequence of commands or program invocations.

learn more… | top users | synonyms (1)

1
vote
0answers
29 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 ...
1
vote
1answer
38 views

Windows batch script for multiple files

I have multiple ascii files like Total-0100.dat and want to batch process using an executable in another directory. In short, I have multiple files with incremnet of 100 or 1000 e.g. ...
0
votes
1answer
4k views

String replace inside a for loop in bat script

The replace is go well in this script. I am trying to make it dynamic. SETLOCAL enabledelayedexpansion for /f "tokens=* delims= " %%a in ...
1
vote
2answers
6k views

Batch file to install TotalCommander without User intervention

I am new to windows batch file. Here is my first attempt in batch file. Here is my requirement: I should have batch file. When executes, it should read the XML config file for the software list to be ...
0
votes
0answers
12 views

How can I use the directory path of a batch file WITHIN that same batch file? [duplicate]

I want to use a batch file to create directories and copy other batch files to those directories. This is to automatically 'install' different batch programs by copying them to 'program files', ...
1
vote
1answer
22 views

Entering a 2 word answer causes batch file to crash. How can I avoid this?

I am just writing a silly little program, but the problem I'm having seems quite generic. Here is the part of the code that is causing me problems: Warning: the code opens a google search. set /a ...
0
votes
1answer
269 views

Change volume with Dell Latitude point stick buttons

I have a dell Latitude with point stick and buttons that I never use. The keyboard also does not have volume controls, even via the function key. What I want to do is map the three point stick buttons ...
0
votes
0answers
29 views

using youtube-dl.exe for downloading continious videos

I am using youtube-dl.exe for downloading playlist but after some time it automatically stops and doesnt automatically resume the download and after network connectivity changes does the same below is ...
0
votes
0answers
65 views

Batch File to Set Default Programs Without Invoking the Registry

Our organization has the Chrome policy enabled for setting Chrome as the default browser. This setting is mandatory, and cannot be disabled like many of the other policies we have that are ...
0
votes
0answers
16 views

Windows Batchfile

I m looking for a batch code that does the following Job: Delete line 35 to 39 & 43 to 138. The result should stored(Modified) in the same file. I found one such Code by googling. ...
-2
votes
1answer
43 views

cmd: Find first letter from a string

I've no knowledge regarding cmd programming syntax. I have a text file containing user IDs which I need to delete using curl command and for that I need to extract first character of every user ID and ...
1
vote
1answer
26 views

Permanently setting PATH from CMD windows 8

I'm setting up a custom command line utility, and the 'installer' adds a PATH entry. It works after this for the current session. After I close and open the command prompt, the PATH is reset and the ...
0
votes
1answer
25 views

Batch file doesn't execute WinSCP script completely

I am working on a bat file wherein I have to login to a remove server through SFTP with WinSCP and execute a shell script and get a file to system from the remote server. Below is the code. cd ...
0
votes
1answer
113 views

how to use Null is Batch script

I working on small program to update the configuration of small program, I'm new to batch script, user need to enter desired input to go to desired program and I have 5 set of programs with in the ...
0
votes
0answers
19 views

How can I know that I have reached end of the file(EOF) using batch scripting

I am working on batch scripting. I am struck at the of point of comparing my variable with EOF (end of the file). set "file=abc.csv" for /F "usebackq delims=" %%a in ("%file%") do ( if <what ...
5
votes
4answers
24k views

bat file to disable ethernet adaptor and then reenable it after windows log in

When I log into Windows 7 I need to wait 10 seconds and then disable the Local Area Connection (ethernet adaptor) and then reenable it. I have looked through the suggested answer: Enable/disable ...
0
votes
1answer
291 views

Bitsadmin Download Error

I saw a feed referring to downloading via bitsadmin (v.7.5.7601.17514) on Windows 7. I have trouble implementing this myself and continue to get errors when running the code when running from a batch ...
1
vote
1answer
14 views

Parse an output of a command to disconnect a remote desktop session

qwinsta administrator | findstr Administrator Gives output as >rdp-tcp#26 Administrator 2 Active I need to get only the SESSIONNAME i.e. "rdp-tcp#26" and use in next ...
1
vote
4answers
2k views

Is there a way to open a website URL from a text file that lists 600+ URIs via a batch file?

How could I write a Windows batch script that could allow me to open an URL, with a browser—Firefox or Chrome—from a txt file containing all the URIs? The point is: I would like the script to open ...
1
vote
2answers
3k views

bat file to open up a chrome browser window with no toolbars

How to use a bat file to open up a chrome browser window with no toolbars.(just like a popup window) @echo off start "Chrome" chrome --new-window http://localhost/jayambe/ this code when run opens ...
1
vote
2answers
21 views

can't run console program in batch file

I have a batch file (run.bat) which is to change my IP address setting: netsh interface ip set address "lan" static 192.168.30.77 255.255.255.0 192.168.30.2 The command worked as I expected when I ...
3
votes
4answers
7k views

Change directory in batch file with PowerShell

I need to changed directory using batch file in PowerShell. Let's say the batch file named go.bat has the two lines of code. And I'm in q: directory. c: cd c:\abc\def When I run go.bat, I'm ...
2
votes
2answers
44k views

How to extract part of a string, in Windows batch file?

If I have a variable in a batch (cmd) file that looks like "Abc_123", and I want to end up with a variable that has just "123", is there any built-in way to do this? I'm not terribly picky about the ...
0
votes
3answers
22k views

Ssh to a remote server using putty through windows batch?

On Windows I use PuTTY to log in a remote server via SSH. I want to use Batch script to ssh remote server using putty. Server is a linux based OS. I used below script to do the same: start ...
1
vote
1answer
23 views

Batch file append slash to the beginning to string variable

I have a variable containing a path like this a\b\c And I want to turn it into something like /a\b\c I tried like this set SLASH=/ set HOME_MF=%SLASH%%HOME:\=/% and a number of other ways, ...
1
vote
1answer
11k views

Batch file script for Enable & disable the “use automatic Configuration Script”

My intention is to create a .bat file that toggles the check box of "use automatic Configuration Script" in Internet Settings. The following is my script @echo OFF setlocal ENABLEEXTENSIONS set ...
4
votes
2answers
2k views

The Directory name is too long in batch

I already asked the question in stack overflow, but did not get any answer from anyone. So i am asking the same question here also. I am trying make a program which will calculate size of all folder ...
3
votes
3answers
2k views

Windows cmd output redirection to standard input ( >&0 )

From a question on Stackoverflow, i've being testing with redirection from/to stdin stream. And this tests, trying to send data to the stdin stream, just to see what happens, end with an apparently ...
0
votes
2answers
24 views

Have .bat ask for further input

If I end a line in cmd with ^, it will ask for more input. D:\some\folders>do ^ More? stuff Let's say I don't want to enter do every time I wanna do stuff so I put it in a .bat, and let's say ...
7
votes
3answers
14k views

Ping every IP address in a text file?

Let´s say I have here a text file with some computer names (each line == 1 name): computerA computerB computerC ... Is it possible to create a batch file that is pinging all of these computers? And ...
14
votes
0answers
293 views

CMD window will not close if folder is closed during execution of bat file

I have a Server 2012 R2 Standard 64 Bit virtual machine that is acting strangely. Bat files work fine and the CMD window closes normally; but if the folder containing the bat file is closed during ...
0
votes
1answer
4k views

Changing Gateway and DNS addresses with batch file

I'm having a little crisis every time I have to change the gateway in order to access different sites from my workplace. It's time consuming and I'd be really glad if someone provides me with a script ...
1
vote
2answers
93 views

How can I elevate my cmd prompt using the the cmd line

I follow this script "runas /profile /user:administrator\administrator cmd"and when it prompts me for my password it always says that it is incorrect even though i am spelling it correctly. help ...
1
vote
2answers
25 views

Read lines from a file into command window and expand variables

Im trying to see if its possible to read lines from a file into the command window and then write them back out to a file. The tricky part is that anywhere in the file where there is text resembling ...
0
votes
1answer
62 views

How do I restore .bat association on Windows 8? [duplicate]

I have accidentally set the association for .bat files to notepad. This was done by going to the Default Programs panel and setting it to run with notepad. I've tried everything I can find on this ...
2
votes
2answers
29 views

does start title and tasklist /fi windowtitle reference the same title?

I was looking up the start and tasklist commands, and i noticed 2 things. They both had references to a window title. start "myTest" /b somefile argA tasklist /fi "WindowTitle eq myTest" the thing ...
7
votes
3answers
3k views

Batch real time wait for a file

I have some batch scripts which wait for files. The wait loop is done with the typical IF EXISTS loop: :waitloop IF EXISTS file.zip GOTO waitloopend sleep.exe 60 goto waitloop : waitloopend I am ...
0
votes
1answer
14 views

“Element not found” error when adding dns via netsh command

When trying to add dns entries via netsh commands, I get "Element not found" errors. netsh interface ip set dns “Wi-FI” static 10.0.0.1 1 What is the correct command format for setting both primary ...
0
votes
1answer
31 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 ...
2
votes
1answer
34 views

NirCmd Screen stays black after waking up from sleep mode

I have a computer that should have 0 user interactions. I want it to turn off and on on specific times. Right now, i have a command that puts the computer to sleep. However i also need a task that ...
8
votes
1answer
933 views

Batch file opens Default Browser instead of Firefox

I have a login script that runs for every user. The first check sees if the username matches our Test-Taking User (exam). If so, launches Firefox to the exam homepage and stops. The commands ...
-1
votes
0answers
10 views

Manage auditing and security log Remotely

I am tasked to add an account in the "Manage auditing and security log" under User Right Assignment in the Local policies of gpedit. However i have so many workstation without AD, and i need to write ...
0
votes
2answers
3k views

Cut a part from a filename (windows batch)

I got files named like this: cam1(word1 word2 wordN) (24-04-2012 00-11-13).mpg cam2(word1 word2 wordN) (24-04-2012 00-11-13).mpg cam3(word1 word2 wordN) (24-04-2012 00-11-13).mpg Need to cut (word1 ...
2
votes
2answers
6k views

Looking to create a batch file capable of editing a line (or word) in a text file

I have a text file (...\config.txt) containing 2 lines which looks like: Preamp: -4 dB Include: surround.txt I need to change "surround" to "headphones" in that config file. I really need to make 2 ...
30
votes
5answers
429k views

How can I check a system's current NTP configuration?

I need to verify the current NTP configuration on some Windows systems. Ideally, I'd like to be able to do this via command line instead of navigating through configuration screens. (I'm working on ...
0
votes
0answers
19 views

How to .bat launch a vnc session in windows?

I have a specific vnc session I want to start up: myhost: 5000 Password: *()BS^Y9hub)GS*^&Dt I am using the standalone VNCViewer-5.x.x.exe file right now to start it. vncviewer command does not ...
1
vote
0answers
46 views

Replace / Edit host file with windows BAT

I wish to add and remove some lines in host file within a period of time (Time setting will be done via task schedule job) I can create two BAT file, one for adding new lines and one for removing ...
0
votes
0answers
19 views

Batch File Move command to non existent folder

I accidentally executed a move from a file to a folder that doesn't exist. How can I restore my file? It is listed with correct file size but without an extension.
2
votes
1answer
68 views

Need a batchfile to run on startup/shutdown, logon/logoff & lock/unlock for a Windows 10 machine

I'm not yet a programmer but looking for a solution that is not made yet seems fun. I do have some questions about the solution I look for. Situation: I have a keyboard that needs an application to ...
3
votes
3answers
5k views

How to set to a variable, the result of a expression

I need to extract the date of a file, for then use this string as part of the name of a new file. I trying to solve this using the next commands: First I get the details of the file and redirect the ...