Text file containing a sequence of commands or program invocations.

learn more… | top users | synonyms (1)

0
votes
1answer
26 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
111 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
0answers
48 views

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

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
15 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
27 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 ...
1
vote
2answers
60 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 ...
0
votes
3answers
34 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
1answer
25 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 ...
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
31 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
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 ...
-1
votes
0answers
14 views

adwcleaner to work alone and hidden [closed]

I'ld like top have a batch file that make adwcleaner to work alone and hidden, along with another simple program. Like one press button for the job to be done. In order to create something similar to ...
0
votes
1answer
20 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
51 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
18 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
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.
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
1answer
36 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
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 ...
0
votes
1answer
30 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
21 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 ...
-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
51 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
21 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
184 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 ...
0
votes
1answer
17 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
19 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
38 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
30 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
28 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
36 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
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 ...
0
votes
1answer
56 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
38 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
55 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 ...
2
votes
1answer
55 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 ...
2
votes
1answer
46 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: ...
1
vote
1answer
51 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
53 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
52 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
25 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
43 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
24 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
46 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
24 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