Text file containing a sequence of commands or program invocations that does not need user intervention.

learn more… | top users | synonyms (1)

0
votes
1answer
16 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
9 views

Batch muxing with MKVmerge, issue with batch file not seeing sub-folders

So recently I've been trying to convert all of my *.avi files to *.mkv files using mkvmerge and since the program doesn't have anyway built in to do multiple files/outputs at once, started digging ...
0
votes
0answers
20 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
21 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
24 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
26 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 ...
4
votes
3answers
519 views

Delete all Files from Folder and Sub Folders

I'm wanting 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 VBS scripting? I have tried a very basic batch command but ...
1
vote
1answer
18 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
37 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 ...
0
votes
0answers
15 views

How to view file activity (from the command prompt)?

I want to see who recently saved a large number of files to a shared folder on our network, and if I recall, there's a way to print file activity from the last week for example in the command prompt. ...
0
votes
0answers
21 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
53 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 ...
0
votes
2answers
53 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 ...
0
votes
0answers
61 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 ...
0
votes
0answers
9 views

SoX Unable to batch process more than 100 files

I'm using this: cd %~dp0 mkdir converted FOR %%A IN (%*) DO sox %%A -b 32 "converted/%%~nxA" rate -I 192000 pause If I try to drag-drop more than 100 files it simply does nothing. How might I ...
2
votes
1answer
55 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 ...
0
votes
2answers
29 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
59 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
19 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
32 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 ...
0
votes
1answer
52 views

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

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 ...
8
votes
5answers
744 views

Properly close (not kill) programs from the command line

What is the proper way to close/exit programs from command line, similar to pressing the "X" close button in the corner of the window? Im trying to close chrome under 3 different versions of windows: ...
0
votes
1answer
19 views

Delete specific subdirectory file(s)?

I require a batch script that will delete a specifically named file or list of files in a defined subdirectory. The subdirectory structure will always be the same however the root folder of the .bat ...
0
votes
0answers
12 views

Irssi - Window disappearing after opening through Start Menu

I am using Irssi for an IRC client, and I can open it when I oepn Windows File Explorer, and navigate to the directory, then double click on the .cmd, or .bat files. However, when I go through the ...
0
votes
1answer
29 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
93 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 = ...
1
vote
2answers
165 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
34 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
38 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.
2
votes
1answer
82 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
26 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
53 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
93 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
0answers
24 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
34 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
31 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
54 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 ...
1
vote
2answers
109 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
162 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
43 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
458 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
75 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
52 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
37 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
39 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, ...
2
votes
2answers
129 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
35 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
0answers
33 views

Multithreaded FTP from Batch File Windows

I need to implement a multithreaded FTP upload of all files in the directory of an FTP server. Presently the batch file uses mget and to upload changes uses an mput. This very slow. I was looking into ...
0
votes
2answers
121 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 ...
1
vote
1answer
1k views

Batch file with commands to run as administrator and standard user

I'm trying writing a batch file that needs to run some commands using a local admin account (start/stop a service) and some commands using the logged in user (copy files from the user directory) and ...