Text file containing a sequence of commands or program invocations.

learn more… | top users | synonyms (1)

1
vote
1answer
133 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
56 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 ...
0
votes
2answers
65 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
70 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 /...
3
votes
3answers
293 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
1answer
27 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
43 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 \\Folder1\...
3
votes
2answers
206 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
vote
4answers
162 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 ...
1
vote
1answer
197 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
1answer
47 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 command activates the bit lock on windows on a removable G drive. I want preferably a ....
1
vote
1answer
76 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
112 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
26 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 ...
0
votes
1answer
25 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; ...
3
votes
1answer
229 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
vote
1answer
92 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
25 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
27 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.
0
votes
0answers
176 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
1answer
50 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
0answers
28 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 -...
0
votes
1answer
120 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
102 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
130 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
60 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
227 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 ...
0
votes
1answer
30 views

Windows console aliases in any cmd.exe? Is it possible?

Thanks to similar questions, i figured out how to use aliases in Windows. I created *.bat file with content: DOSKEY tf=npm run testCucumberFirefox DOSKEY tc=npm run testCucumberChrome DOSKEY tie=npm ...
1
vote
1answer
57 views

Run batch job periodically after a process has terminated

I used FreeFileSync to create a batch job to backup my Firefox profile and I'm not sure how to run it periodically (every hour or so) or after Firefox has been closed. FreeFileSync's website ...
0
votes
1answer
142 views

Move files of particular pattern in batch to another folder [closed]

I am trying to write a Windows batch file with commands for moving files with a pattern the file name from one folder to another folder, and others to others. For example: vision.xls should go to a ...
-2
votes
1answer
68 views

Adding a registry key via batch file [duplicate]

could anyone tell me how exactly to do this via a batch file: https://support.microsoft.com/en-us/kb/3123303 The x86 version. Much appreciated.
-1
votes
1answer
108 views

Modify Windows Installation by custom bat file

How can I with no usage of 3rd party tool modify Windows Installation by packing custom bat file into Windows 10 installer? I expect that installer start it after installation with privileges that bat ...
2
votes
1answer
108 views

Check if a process is running or not continually, and start multiple programs if not and terminate itself

I found this at stackoverflow and it's code is this:- @echo off Set "MyProcess=calc.exe" echo "%MyProcess%" tasklist /NH /FI "imagename eq %MyProcess%" 2>nul |find /i "%MyProcess%">nul If not ...
-1
votes
2answers
90 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 ...
0
votes
1answer
713 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 ...
0
votes
2answers
42 views

Connecting two computers through Ethernet wire and data transfer

I know how to share files and transfer data through Ethernet by assigning IP and getting through by giving the right credentials. Is there a way to do this more simpler or any other way without ...
2
votes
2answers
178 views

End Remote Desktop Session and Standby

I've setup remote access on my computer (Windows 7 Pro x64 via RDP). The [WOL] wake-on-lan function is already working so I can wake it up from sleeping. When I end a remote desktop session (start-...
2
votes
1answer
152 views

How to use FINDSTR to search in a specific line?

I have a file example.txt and a string "Hi" and the beginning of the 15th line. The required code for findstr should be: findstr /b /n "Hi" "example.txt" Is there something that can search for "Hi"...
2
votes
1answer
81 views

Windows UnRar Batch script need to ignore .part02.rar through part99.rar extensions

I have two windows batch scripts that both work to recurse the folder they are placed in, and extract every .rar file into the folder of the rar files. however when a folder uses the structure: file....
1
vote
1answer
204 views

Compare and replace files using a batch file

Using a batch file you can do fc folder1\* folder2\* Now, I'd like to extend that to support subfolders (assuming it doesn't already, idk), and additionally automatically move the missing files from ...
2
votes
1answer
124 views

Batch File to Delete a folder if it doesnt contain a specific file

I have a folder with loads of subfolders. I need a batch file that looks down the list of subfolders and checks if a specified file exists. If the file does not exist then the sub folder can be ...
1
vote
2answers
84 views

Quickly create a new Firefox profile and load Firefox with it

I want to be able to quickly create (and delete) Firefox profiles for testing purposes in Win 7 SP1. To do this, I created a batch file with the single line: firefox.exe -CreateProfile test &&...
1
vote
1answer
90 views

Passing Env Variables to Batch File

I'm having difficulties passing a env var (declared in my .bash_profile) to a batch file script which executes a BTEQ operation (in Teradata). .bash_profile contains: export DBPASSWORD='password' ...
0
votes
1answer
100 views

How do I get the bytes sent and recieved in taskmanagers networking tab in cmd

How can I see a NIC's bytes received and bytes sent at the Windows command line? I've tried the following: netsh interface ip show ipstats and net statistics workstation but they don't show the ...
0
votes
1answer
41 views

Is there anyway to enable autosleep in batch in windows 10?

I have a requirement that enable autosleep in batch file. The reason is i want to autosleep my computer after getting off work, but disable autosleep when i'm on duty I know how to auto wake up my ...
-1
votes
1answer
164 views

Escaping ampersand (&) in Windows batch script used to map/connect network drives

Using a simple batch file to connect to network drives on Windows start-up but one of the folder names contains an ampersand and I cannot for the life of me, figure out how to escape it. Here is the ...
0
votes
1answer
47 views

Create a shortcut to a batch file with args [duplicate]

I need to create a shortcut to a batchfile say start.bat, with some arguments. Can I do it like "D:\Jboss\start.bat" arg1 arg2
1
vote
1answer
731 views

Copy from one location to another using batch script based on modified date and also newly added files in source

How to copy files which are modified and the new ones that are added in the source location to the target location using a batch script? The existing files that are already present in the target ...
0
votes
2answers
93 views

Is it possible to execute batch commands from Windows shortcuts?

I'm trying to run some programs from a flash drive. Therefore, I want them to keep their data on the drive as well. I know how to do this using the following batch script; APPDATA=%CD% Program.exe ...
2
votes
2answers
131 views

Batch Script To Randomly Rename A Single Selected File

I'm trying to hash out a batch / .bat script that renames a single file to a random string of characters. Everything I have found upon searching so far is to rename all files within a single directory ...