Text file containing a sequence of commands or program invocations.

learn more… | top users | synonyms (1)

1
vote
1answer
9 views

MSDOS 4.0 string manipulation?

Due to very old hardware I'm forced to run Windows 3.1 that controls the plotter. The software I'm using creates a .bat file with this line in it: SPLOT.EXE/fmyfile.uc c:\myfile.plt the /f - is a ...
0
votes
1answer
10 views

Rename folder on remote server

I am calling a .bat file which contains the following command net use \\128.545.k.k\E_Drive /user:Username psw to connect to a remote server. I would like to rename a folder on the remote server i ...
1
vote
1answer
21 views

Local group policy for all users

Windows 7, 64bit. I have two simple .bat scripts created, one which runs at logon, the other at logoff. The .bat files are located in C:\bat. Other users have access to this folder. The contents of ...
1
vote
1answer
22 views

Disable com port until login

Using Windows 7 (64bit). I have an RFID Pad connected to my PC via USB. My issue is that whenever the RFID pad is connected and I start the PC, I get a blue screen of death just after the 'Starting ...
1
vote
1answer
10k 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 ...
2
votes
2answers
5k 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 ...
3
votes
3answers
131 views

Batch command how to make a list for set /p

I am trying to make a batch script that asks for user input. The user input should be limited to certain words. If the user enters any other words than e.g. (eng, ger, fra) the user will get an echo ...
0
votes
2answers
19 views

RDP logout using bat file

Using Windows 7. When I RDP to a PC I'd like to be able to logout of the session without the screen reverting to a Ctrl+Alt+Del Login screen. The PC's in question are kiosks running Chrome in full ...
0
votes
1answer
40 views

Using for and if commands for a list of strings in a batch file

I am making a batch file for windows. I have just started learning batch scripting and I have some problems here. @echo off set langList=("eng","fre","chi") :Get_ISOlanguage set "ISOlanguage=" set ...
0
votes
0answers
54 views

What does the %% signs in batch file refer to and where are they read from [on hold]

I actually have a lot of questions about .bat (or .batch) files is there a specific language for batch files? and is there an online resource(s) to learn it? For example in a program-A when I open ...
0
votes
1answer
17 views

Run several processes in cmd window with ConEmu

I'm using ConEmu with Windows 8.1. I need to write a BAT-file, which will run ConEmu and open several cmd-shell tabs, running a process in each of it. Right now my file looks like this: start ...
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 ...
0
votes
2answers
32 views

Copying and renaming of .xlsm files using batch

Its glad to be here and i am really excited n new to batch scripting. I have been using a batch containing below for copying an excel from one folder to another { @echo off cp -r ...
2
votes
2answers
65 views

How can I tell if my batch file is running?

I have a batch script which is run from an AT command, and may get run more than once. When it starts, I need it to detect if it already running, and if so, exit (the second one) immediately. It ...
-1
votes
4answers
6k views

Simple batch file fails on Windows Server 2012

On a Windows 2012 Server, from a logged-in Administrator (local and domain), created a batch file "test.bat" by redirecting console input into a file: echo Hello When run from PowerShell cmd prompt ...
0
votes
3answers
36 views

Batch file to run programs as admin - error 740

I am working on a small batch script that elevates basic windows programs to run as administrator. All of the functions work fine but I have ran into a problem when trying to run "regedit.exe". When ...
0
votes
3answers
5k views

/ was unexpected at this time

I am getting "/ was unexpected at this time." while using the below for loop for some cases only. for /f "tokens=1,* delims=;" %%m in (file.txt) do ( echo Inside Loop echo %%m ) I'm ...
0
votes
1answer
31 views

can you start a program at windows startup using bat file and send it file path

can a bat file or vbs file take an argument (a path to an exe file) then create a shortcut to that file and place in the startup folder or add a registry entry to run that exe at windows startup but ...
0
votes
0answers
25 views

Autorun a bat file after a predefined inactive period

Is there a way to auto run the following command after a predefined inactive time? manage-bde -lock G: This DOS command activates the bit lock on windows on a removable G drive. I want preferably ...
2
votes
3answers
4k 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 ...
0
votes
1answer
59 views

Windows batch file not running when I double click, how to restore association with cmd.exe?

Windows 8 64-bit. The user I'm logged in as has admin rights. When I open a cmd windows the window title even says "Administrator: cmd.exe". So, I set my .bat file association to have the .bat file ...
-4
votes
2answers
365 views

windows 7 batch file for swapping filenames randomly

I need to write a batch file that goes into a folder and randomly swaps (renames) all the filenames. This folder has about 1000 files. So it is acceptable if there are few misses.
1
vote
1answer
17 views

Run Atom using a bat file after changing directory

I have writen in my bat file cmd /k cd /d"C:\Users\amanz\Desktop\Introduction - Computing\Java files" call atomer.bat right now, it just seems to change the directory and stops right there. It ...
2
votes
1answer
34 views

Batch command delete from list of files from multiple computers

Currently I use a poor piece of programming where I delete multiple files on multiple PC's. What I would like to do is have a file with the names of the PC's (PC.txt) and a file (filedel.txt) with ...
0
votes
1answer
21 views

Open an executable with a parameter?

I'm trying to open putty with my server data loaded through a batch file. I tried start "OVH" "C:\Program Files (x86)\PuTTY\putty.exe -ssh username@ip.address -pw password", and that did not work; ...
0
votes
1answer
20 views

Batch file to detect when a device connects to hosted wireless hotspot on a laptop

I have created a wireless hotspot on my laptop using: netsh wlan start hostednetwork This works perfectly. I have a raspberry pi that automatically connects to this network automatically, however ...
3
votes
1answer
56 views

Batch file FOR loop to copy folders only if they exist in another folder

I'm trying to write a batch file that copies folders from one folder location to another, but only if they exist in a third folder. That sounds confusing, I'll try again. I have the following 3 ...
-1
votes
0answers
15 views

Windows Update on multiple servers [migrated]

I have about 500+ servers( Win 2003, 2008, 2012). At the moment patches are set to available by SCCM. We need to login to the servers and download n Install the patches. Once it done we restart the ...
1
vote
1answer
21 views

Bat file doesn't log when running from task scheduler?

I made a bat file which restarts 2 services, and I have it run in task scheduler. If I run the bat file normally, I can see it logging in current directory as the bat file. But if I run it through ...
1
vote
1answer
37 views

Need assistance with an existing batch file

I need a batch file that I can leave running, and if "Unturned.exe" is not running do START "" /B "C:\Users\Administrator\Desktop\1.lnk", and then idle, scan, and wait for it to shutdown again in a ...
0
votes
1answer
33 views

In Windows cmd batch file how to ignore carriage return

I have a Win 7 bat file that prompts user to enter a number, then it passes that number as an argument to a tcl script. An optical barcode scanner is used to provide the number, but then I want user ...
1
vote
1answer
19 views

Multiple line Windows Batch File issue

I have a batch file with following contents Line 1 "C:\Program Files (x86)\Dell\SysMgt\bmc\ipmish.exe" -interactive -ip 192.168.1.5 -u root -p Password after this it goes to prompt IPMISH> Line 2 ...
0
votes
0answers
23 views

Write on screen directly on top of everything

Is there any way to make some huge text appear on screen on top of everything? something as shown below. I know I can use Rainmeter but i need something that can be used in batch files.
1
vote
2answers
5k 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
22 views

Run local bat file from Chrome or Chrome extension

In my project I have an internal tool made of web page. To evolve this tool I would like to run on request, another tool installed on the client machine. There is a way to do so? The second tool is ...
1
vote
3answers
8k views

Upload folder with cURL and FTP using Batch file on Windows?

I am trying to upload a whole folder, including it's sub-folders and files to a folder on my server from a Windows batch (.bat) file. Below is the command I have for the Upload part... curl -T ...
0
votes
1answer
58 views

Run a .bat file with CMDER

I have a .bat file that I want to run in Cmder not CMD echo off :begin echo Select a task: echo ============= echo 1) P1 echo 2) P2 echo - set /p op=Type option: if "%op%"=="1" goto op1 if ...
0
votes
0answers
22 views

Error level of a for command in a batch script

I am trying to get the error level of the isql command executed in a for loop. But I always get 0. for /f "skip=4" %%i in ('echo SELECT COALESCE^(MAX^(ID^)^,0^) FROM LOG^; ^| %isql% -B -Q -U SYSDBA ...
-1
votes
0answers
16 views

Deleting PDFs on a daily basis [duplicate]

I'm using W7E and I generate a lot of reports in PDF format on a daily basis. What I am looking to do is have a script that will run once a day on its own, and at a specified time. It will then look ...
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
1answer
24 views

Copy specific folders on Windows (robocopy)

I want to do some thing simple (I thought...) I've got something like this: Folder01 |_File1 |_File2 |_File3 Folder02 |_File1 |_File2 |_File3 Folder03 |_File1 |_File2 |_File3 ...
0
votes
1answer
3k 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 ...
0
votes
1answer
1k views

run multiple commands from a file after logging into putty from a bat file

I have written a bat file in which I have the following: putty.exe -t -load "ABC" -l username -pw password -m "C:\Users\pathasai\Desktop\abc.txt" In my abc.txt I have written some commands which I ...
1
vote
2answers
41k views

Create new directory with batch file (MKDIR not working)?

I tried using at first a combination of xcopy and del, but del kept failing. xcopy creates directory if it doesn't yet exist. The other option is to use MKDIR but it does not work inside a batch ...
-2
votes
0answers
17 views

Is there a label/goto in python? [migrated]

We can use goto and :label in batch. Is there anything like it in Python? I am a beginner in python. Thanks SuperUser
0
votes
1answer
52 views

How can I create a shortcut to launch a batch file one folder up?

I have been trying to create a shortcut to launch a batch file one folder up from the shortcut location. I have not been able to find and answer this. I have been able to solve this using an ...
1
vote
1answer
22 views

Rename folder of files from epoch (unix time) to month-day-year-hour-minute-second?

I have a folder full of recordings which all read: " rec.(unixtime).mp3 " ex: "rec.1447666687584.mp3" ideally turns into something like "10-16-2015_01-38-07.mp3" I need to convert these filenames ...
2
votes
2answers
185 views

extract data from output in bat file

I want to add my ip to system/user environment in a bat file. This is the code of the bat file curl http://httpbin.org/ip This is the output: { "origin": "1.2.3.4" } I want to set ...
-1
votes
0answers
13 views

I would like to use a .bat file to clean up files (delete) in subfolders but leave a weeks worth of files [duplicate]

I would like to use a .bat file to clean up files (delete) in sub folders ie..F:\Captures(40 sub folders) but leave a weeks worth of files. Would this be possible? Or would i need a separate .bat file ...
-1
votes
2answers
53 views

Delete files when names do not correspond with parts of strings in txt file - Windows batch

There is a txt file, which contains (among many others) strings, which start with: "HH:MM:SS case" where H, M, S are hours, minutes and seconds (in 24h format). There are .jpg files, with names ...