Text file containing a sequence of commands or program invocations.

learn more… | top users | synonyms (1)

2
votes
2answers
1k views

Open browser window at specified screen / coordinates

A customer has a 6-screen setup for each workstation and would like various pages of a web app to be opened automatically in each of the screens on startup or invoking a shortcut. (The target web ...
1
vote
1answer
233 views

Batch file that runs another batch file, and reopens it when it closes

I need a batch file that: 1. Opens another batch file, or detects when this batch file is open 2. Will reopen this batch file when it closes. I am completely new to making batch files so I don't know ...
2
votes
2answers
371 views

Speed up file search in a network path

I am trying to search in a network path inside a folder of 152.000 documents, list of files to be searched is 1500, after 5 hours it has only found 50 documents. This script was written by another ...
0
votes
1answer
7k views

Shell files (*.sh) to batch file (*.bat) converter?

It's quiet tedious to convert shell scripts into batch files. Is there a way to automatically and easily perform .sh to .bat conversion or vice versa?
0
votes
1answer
109 views

regulate browser memory consumption

I play a browser-based game that I would like to be able to keep running 24/7 if possible. The problem is that the more the page is refreshed, and the longer the game kept running, the more memory the ...
0
votes
2answers
11k views

Upload the whole directory with FTP from the command line [duplicate]

I've got this .bat file: ftp -s:commands.txt File commands.txt: open www.domain.nl username password cd path/to/upload/to/ prompt How can I now upload the folder where I ran the .bat to the ...
0
votes
1answer
647 views

Suppressing errors from an embedded command in a batch file for loop

I have a batch file that uses the for command to parse the output from another command, but I want all errors written to STDERR to be suppressed. I have tried this: for /F "usebackq delims=" %%a in (...
0
votes
0answers
1k views

Batch file - Copying folders with percentage

I'm currently trying to create a batch file, which actually copy a folder from a server to a clients machine. And I'm playing around with batch file, using xcopy, and it gives me the percentage of ...
2
votes
1answer
321 views

how to shift all parameters in a batch

The well-know shift command can be used to shift positional parameters in batch file, BUT it does not affect the special variable %*. The shift command has no effect on the %* batch parameter. Is ...
2
votes
1answer
54 views

Attempting to end CMD after Batch File

I am running a Batch file on which is located on my DC. explorer.exe = taskmgr.exe end; end; The batch file works fine and does what I need. The thing is that when I run this batch it forces the ...
0
votes
2answers
2k views

Copying files that match one pattern but not another

I have a number of files that follow a pattern like this: <BaseName> . <Version> [ - <Tag> - <#> ] . <Extension> For example: basename.1.0.0.ext basename.1.0.0-aaa-1....
23
votes
7answers
67k views

Delete all files from a folder and its sub folders

I want to remove all files from a folder structure, so I'm left with an empty folder structure. Can this be achieved in either batch or VBScript scripting? I have tried a very basic batch command, ...
0
votes
0answers
50 views

Extra space when starting application with arguments using batch?

Any idea why there is an extra space before the argument? Thank you. http://s7.postimg.org/ee1fbtye3/extraspace.png @ECHO OFF SET EXEPATH=D:\Games\StarForge\StarForge.exe SET ARGS=-nolog START "" "%...
1
vote
1answer
87 views

Echo output from commands in a batch file to the cmd

I have the following commands inside a batch file: initialize.exe go run main.go Both initialize.exe and go run commands output some data, when invoked directly from the command line. When i ...
0
votes
1answer
886 views

How do I write a batch script that iterates through all png files in all subfolders and does an action?

I'm looking to build a small batch script that executes the command line of pngout.exe So far I've got only this down for %i in (*.png) do "g:\myfiles\_pngout.exe" "%i" /s0 /c6 However, for that ...
3
votes
1answer
7k views

Install a Teamviewer host silently with custom password

Our company has the custom Teamviewer hosts that we can run silently with the /S switch. The issue is that we can't connect due to it not setting a password that we know. Does anyone have any thoughts ...
0
votes
0answers
452 views

Batch script to get data in an infinite loop and post to a URL

Here is my working script for Unix. It gets data from command line and posts this data to a URL: #!/bin/bash while read line do echo `curl -XGET "http://domain:8080/test/$line"` done I tried ...
0
votes
1answer
226 views

Command line - Some questions

I've created a batch file for zipping selected items in a folder. (The file is placed in 'Send to'). If I use the following code: for %%* in (.) do set CurrentFolder=%%~n* "C:\Program Files\WinRar\...
0
votes
3answers
24k 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 C:\...
0
votes
0answers
479 views

Adjust Microphone Volume After Launching Application

I currently have a USB headset plugged into my computer and its mic volume is set to 82%. Whenever I launch the game Titanfall, my mic's volume is raised to 100%. I am trying to find a way to ...
6
votes
2answers
3k views

Disable close button on DOS program in Windows 7

At my company we have stores that run some old DOS software. Before Windows 7 you could run these programs in full-screen and now you cannot. I know there are work-arounds to get in full-screen (e....
0
votes
2answers
2k views

Powershell: The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered

I am trying to run a PowerShell script from a windows batch file. This is a SharePoint related script that uses Import-SPData. This works without any issue when using USERA's login. However, if I try ...
0
votes
2answers
151 views

Windows Command Prompt [closed]

How to load a prewritten line in command prompt? Example: Take the followings as a line: java -jar System.jar Can this command line be written in a .bat file so that by clicking on the .bat ...
0
votes
0answers
562 views

Invoke bat file from JavaScript file with parameters

What I need to do is to pass two parameters from HTML to a batch file. I am invoking a batch file from a JavaScript method inside HTML, and I am able to invoke the bat file, but I can't pass any ...
1
vote
2answers
108 views

Given a list of filenames, how can you iterate through subdirectories and return a list of where those files exist?

I have discovered an old playlist that I'd really like to listen to. Unfortunately, it's one that was created for a USB stick that had music copied out of my collection into a flat folder. What I ...
1
vote
1answer
937 views

Batch file to compress WinSxS files that haven't been used in a while [duplicate]

I plan to compress unused files in the WinSxS directory because the directory is too big. To do so I enabled tracking of last file access time (fsutil behavior set disablelastaccess 0). I'll use the ...
0
votes
1answer
47 views

How to know which file was right-clicked on?

I'm trying to write a script and add it to the right click context menu. To add the items to the menu, I've used this: Windows: How to add batch-script action to Right Click menu, except instead of ...
1
vote
1answer
1k views

Launch multiple programs in background on windows 8.1

I want to start (launch) three programs in windows and all of them in Background i.e. No windows. I found two ways (both using vb script to hide a bat) Set WshShell = WScript.CreateObject("...
4
votes
2answers
14k views

How to create multiple folders and name them by reading lines from text file?

I have a plain text file named Export.txt. It contains a list of geographical places, preceeded by a 3 digit number with leading zeros. Example --START OF FILE-- 001 Aberdeen 002 Bellevue 003 Camas ...
0
votes
1answer
518 views

Problems starting a JBoss 7.02 server on computer startup

I have a JBoss 7.02 server running on a Windows Server 2008 machine. The server needs to be kept running at all times, but every so often the host machine will restart leaving the application ...
0
votes
1answer
81 views

How to define access to just the System event log on Windows 2008 Server

I want to restrict administrator user access to the Security event log, is there a way to do it? I was following this article, but so far no luck.
3
votes
2answers
777 views

How to avoid mkdir path redirected to SysWOW64

I'm tring to create some directories (dirs) using a .bat file. At the cmd.exe, I can create the dirs normally, but when runing the commands inside a .bat file, for some odd reason, the dirs are ...
0
votes
1answer
68 views

Calling an alias in a batch file

I have the following code. I am attempting to change the name server and then reference the command nslookup to use that name server but it doesn't work i.e. it returns the error that nslook does not ...
0
votes
0answers
347 views

Runas weird functionality with command line

I have a .bat file I use to launch some programs. Some of them require elevated privileges (i.a. a devcon-based does-device-exist check), but some don't. So, I run the .bat as administrator, and use ...
1
vote
6answers
182 views

Batch Renaming Automation *_2.* TO *.*

i am in the process of renaming multiple files from *_2.* to . I want to remove the "_2" suffix My first workaround is trying ren *_2.* *.* but this does not work. Help is apperciated.
1
vote
1answer
77 views

Some user enabled shortcut keys not working in Windows 8

I like to think of myself as a power user and therefore I setup short cut keys on the keyboard to minimize steps for opening applications. I have created a keyboard shortcut to a shortcut of a bat ...
-2
votes
1answer
106 views

Batch file test for path + file name with extension

Batch file in Windows 7. I want to know how to test for a path + file name with an extension, if it exists or not. I have tried if exists "myfile.ext" It seems not to see the file. Your ...
0
votes
1answer
242 views

How can I simulate Make's targets within a Windows batch file?

In working towards resolving http://tex.stackexchange.com/a/160685/17423, I'm looking to create a batch-file version of this makefile. Is there a clear/conventional way to simulate the 'target' ...
0
votes
2answers
1k views

How to create a batch file that output file name in txt?

I want to copy the list of all file name into a txt with a bat. For example, if I have a .bat and if I move that bat to D:/123 or anywhere and click on it, I will get a text file with all file name of ...
2
votes
2answers
2k views

Batch script move files from Windows Recycle Bin

Is there a way to move files from the Windows Recycle Bin to another folder using a batch script? Background: I have a folder named C:\Temp on my computer. I clear this folder every week using a ...
0
votes
1answer
580 views

Windows 7 - Launch Bat after installation (SetupComplete?)

I'm wondering about a script I made after the installation of my Windows 7 x64 ISO is done. The script (bat) contains this: @echo off cd C:\Users\ RD /S /Q "C:\Users\Public\" cd C:\Users\Unknown\ ...
1
vote
1answer
390 views

Commands run in a batch file only when writing cmd /c before

I am running the following command rabbitmq-server.bat" -detached This command runs a sewrver in the background. When I run it from a batch files - the flow stops and later commands in the ...
0
votes
1answer
10k views

Windows Batch file to copy latest files to a new folder

I want to copy the latest file from a Folder and its subfolders to a new location. The following code works well, BUT I do not want to filter by Date AND Time (/O:D), but DATE only, so that all ...
1
vote
1answer
560 views

How do I create a .bat to logoff a specific user from your pc?

Running remote desktops that are acting as specific users on Win7x64. The main username I'm using is Server. And the rest are as follows hh1 hh2 hh3 etc. Basically these handheld remote desktop ...
0
votes
1answer
192 views

Running a program as non-admin from an admin script? [duplicate]

I have a batch script that runs some programs at once. One of them requires admin access, so it's fine to manually give it. But now I am adding another admin program. I would not like to manually give ...
2
votes
1answer
168 views

What persistent information does the devcon hwids output contain?

I have a gaming keyboard (Logitech G15) that uses its own software for additional features. Now I am writing a startup batch script that starts that software if the keyboard is connected. It of course ...
1
vote
2answers
103 views

Is there a way to force all child batch files launched from a parent to log into one single file?

Suppose I am calling a parent batch file like this call parent.bat >Log.txt and within the parent.bat I calling other batch files which themselves call other bath files. Now whats happening is, ...
3
votes
2answers
3k views

Run a batch file when I lock/unlock my computer

Is there a way I can run a batch file upon locking my computer, and then run another batch file when I unlock it? (Windows 8.1) Thank you!
0
votes
0answers
48 views

How to start an application in a given directory, using other as its working dir?

For a system we are deploying for our customer we need to run the setup executable from %temp% and have it use for the installation, files in another directory. This cannot be solved at the ...
0
votes
2answers
3k views

Batch File - Search for string and copy next word to new file

Good Day All. I want to search for the following string in a bunch of TEXT files in a folder: USER Then I want to copy the string next to this word (USER), and copy it to a new text file. How do ...