Text file containing a sequence of commands or program invocations.

learn more… | top users | synonyms (1)

0
votes
2answers
48 views

How do I make a batch script that toggles my internal Wi-Fi adapter?

It's been a few years since I used a computer that used Windows. I've been using Linux for a while. However, I do remember a few things about writing a batch script. (REM for comments, ECHO to print ...
0
votes
1answer
21 views

Running an executable using .bat file with sound in Windows

I have an .exe file which plays some audio files, and I want to run it when the PC starts. There are some .wav files in the same folder (that the exe uses them). Putting the .exe and the .wav files ...
0
votes
2answers
48 views

Open multiple Microsoft Edge windows from batch file

I need to open 2 Edge windows from a batch file (not two tabs, 2 windows). I know I can launch edge using the following command: start microsoft-edge: But if I try it twice the second command does ...
-1
votes
1answer
21 views

How do I start a program with a hotkey after I started another

I want my program to start by pressing a hotkey, but only if another specific program has already been started, like for example, when I started fraps and then want to start a game after some minutes. ...
0
votes
1answer
21 views

How to select xml value using xml starlet

How do I retrieve a value using xmlstarlet? I'm trying to retrieve the Initial value 4.7 from the following xml file: <?xml version="1.0"?> <GCContextualMethod xmlns:xsi="http://www.w3.org/...
-2
votes
1answer
24 views

Batch rename folders that contain specific criteria

I am looking rename folders that have specific criteria with a batch file. Rename folders that have the months (January, February, March) with the numeric values (01, 02, 03) John Smith June 2016 ...
-2
votes
1answer
25 views

how to move files from sub-folder to folder

I've got: C:/PICS/ASF/photos/files (.jpg) C:/PICS/DFS/photos/files (.jpg) C:/PICS/HGD/photos/files (.jpg) C:/PICS/FTG/photos/files (.jpg) .....etc In every "photos" directory is more than one ....
-1
votes
1answer
46 views

Concatenate 2 files using a .bat file [duplicate]

I need a .bat file compatible from windows 7 to windows 10 which concatenates 2 files For example file1.txt: hello file2.txt: world After running the batch script, a new file called file3.txt ...
3
votes
1answer
58 views

How to connect WinSCP through command line not in GUI mode?

Connect WinSCP console through command-line. Run batch file in it. Commands should be included in batch file for connecting with the server.
2
votes
1answer
35 views

Remove lines form txt file if specific string is found

I can not figure out how to remove a specific line with my batch script for the out put is: type: MD2 status: granted date: 2016/03/11 type: MD2 status: detached date: 2016/03/11 if the status is ...
1
vote
1answer
70 views

Merging Multiple Text File Data, but Specific Lines to Another

I have several Textfiles with a header of no interest and some relevant data. I want a new file with all the important data: Example: File1 has text: Created on 02.02.2016 Country: Chile Figure of ...
0
votes
0answers
37 views

How to automate putty commands when connection is through serial port?

Two files are there. I want to run trial .txt cmd in serial port connectivity with a hardware.pls suggest how to automate this. I will use these cmds repetititvely. Batch file cmds below sv.batch ...
1
vote
2answers
66 views

I need a batch file that opens cmd, runs two commands, and keeps cmd open

I am making a set of batch files made to force restart games when they freeze and won't start back up again. So I need a batch file that opens cmd.exe, runs the two commands: taskkill /F example....
0
votes
1answer
24 views

Mac OS X 10.9.5

I need to run a .bat file on my Mac, the file is a portable version of R called RCommander and I need to run it because it comes with all packages I need to work with and I have problems to download ...
0
votes
1answer
51 views

Copying content from one directory to another [duplicate]

I'm copying a lot of folders/subdirectories from one network drive to another, however, the names of these files aren't known and I only want to copy the contents of the folders that have a name match....
1
vote
0answers
49 views

Mkvmerge batch for change default audio

I want to change the default audio of my files but there are too many. How can I do it with cmd or bat file? This is my code for one file: "C:/Program Files/MKVToolNix\mkvmerge.exe" --ui-language ...
1
vote
2answers
49 views

How to hide commands in the prompt of Windows 10 from a batch file?

I want to hide the commands in the prompt that opened from a batch file. Example: This is how it normally is: This is how I want it to be: It would be good as well if there was a way of output ...
1
vote
0answers
75 views

0x1 issue in windows task scheduler

I am running a bat file which will delete the files or folders older than 14 days from the today's date , when i am testing it in local folders it is executing fine, but when i am trying to delete the ...
2
votes
1answer
48 views

Windows batch: Get the first folder name starting with some value?

I have a batch file in which I pass the name of the folder I want to use as a argument. But now I want to make it a little smarter by letting the user specify only the first few characters of the name ...
0
votes
0answers
26 views

batch programming net use redundancy

I am trying to add some redundancy to a mapped shared folder. my .bat file contains the following: net use * /delete /yes net use * \\xxx.xxx.x.1\shared folder /user:user pass /persistent:yes /y @...
1
vote
1answer
51 views

Bat script for a set of csv files in a folder

How to store a value in a variable and load that variable as a new column in a file using a batch script? The above link is used to read a date field and write it to all the records in a csv file. I ...
1
vote
1answer
29 views

How to store a value in a variable and load that variable as a new column in a file using a batch script?

I want to read a csv file and store a value in a variable and use that variable value to be written as a last column of the same file. @echo off del three.txt setlocal ENABLEDELAYEDEXPANSION set N=...
1
vote
1answer
50 views

CMD or BAT to copy/replace files from a relative path to a .lnk target location

Example : I will have the following : Folder that contains : The CMD or BAT file the file/files needed to be copied ( Ex: file1.exe and file2.exe ) A .lnk located at the desktop ( Ex: C:\Users\...
-1
votes
1answer
34 views

Getting a script to run using file length on Windows 7?

I need a script to run whenever a file is to long (rename the file. Say a rcv file is put into a folder and it is named 123456789.rcv. But the program we use to grab this will not take it because ...
1
vote
1answer
56 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. Total-001000....
0
votes
0answers
14 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', ...
2
votes
1answer
77 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 ...
1
vote
1answer
35 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
131 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 C:\...
0
votes
0answers
23 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. ...
0
votes
0answers
24 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 <...
1
vote
1answer
23 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 ...
-2
votes
1answer
70 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
2answers
28 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 ...
1
vote
1answer
56 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, ...
0
votes
2answers
36 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 ...
0
votes
0answers
55 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 ...
2
votes
2answers
36 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
76 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 ...
0
votes
1answer
61 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 ...
3
votes
2answers
134 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 ...
2
votes
1answer
73 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 ...
0
votes
1answer
232 views

Batch File to Set Default Programs Without Administrator Rights

UPDATE 7/15/2016: A couple days ago, all the Group Policies pertaining to our OU stopped applying - meaning that there are no more restrictions. I now have full Command Line and Registry access which ...
8
votes
1answer
1k 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 ...
16
votes
2answers
445 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 ...
1
vote
0answers
196 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
24 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.
0
votes
2answers
95 views

How to run multiple batch files with one master batch file

I have three bat files I would like to run, in three different directories: directory/bat1/bat1.bat directory/bat2/bat2.bat directory/bat3/bat3.bat I would like to use one master .bat to start all ...
0
votes
0answers
63 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
votes
1answer
63 views

How do I get windows version as a variable?

I'm making some batch files to personalise my windows installations faster, but I need my batch to take a road depending on which Windows version it's running on. If i could get the windows version ...