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

learn more… | top users | synonyms (1)

1
vote
2answers
1k 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
103 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
50 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
166 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
35 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
75 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
114 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
46 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
53 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
35 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
125 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
385 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
259 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
68 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
2k 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
140 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
71 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
63 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
47 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
414 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
38 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
59 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
481 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
2answers
5k 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 ...
1
vote
2answers
223 views

How do I make a batch file the default application for a file type

I am trying to associate .svg files with a batch file that runs squiggle from batik. When I right click on an svg and select Open With and Choose Default Program, I get the usual window, which lists ...
0
votes
3answers
6k views

Run Batch file as administrator [duplicate]

I created a batch file which stops a service,then stops a process and then starts the service it stopped. When I execute the batch file, it says "access denied". I cannot figure out why it says ...
0
votes
1answer
110 views

Delete a file inside subfolder using bat

I know the name of the subfolder inside which the file I want to delete is located. The name of the subfolder is "My Subfolder" and the file I want to delete inside the subfolder is "The-Bad File.txt" ...
1
vote
2answers
44 views

Bat file to backup when the cable is connected [duplicate]

I need to do a Bat file (or something like that) that do a Incremental Backup of some especified folders when, and just when, the Ethernet Cable is connected. How can I do it? I have no idea how can ...
0
votes
1answer
255 views

How to extract part of a string between 2 delimiters, in Windows batch file?

I have a variable length string starting with START and ending with END as delimiters. I want to extract the string between START and END. I tried doing SET _result=%String:~6,-4% ECHO %_result% ...
0
votes
1answer
57 views

How do I remove whitespaces from my merged batch file

I'm trying to merge multiple text files into one single file. The problem with the command below is that it creates several whitespaces in the final merged file content and can't have any spaces. How ...
1
vote
2answers
323 views

Check Multiple if conditions in bat file/ and operator in bat

I want something like this:- if %ERRORLEVEL% GEQ 1 && %ERRORLEVEL% neq 255 GOTO Not closed by user . But this syntax is not working.
1
vote
2answers
422 views

How to schedule taskkill in bat file

I want something like this:- taskkill 7z.exe after 50sec. code 1 code 2 code 3 7z.exe will be killed after 50 sec but the program should execute code 1 code 2 code 3 without waiting for the ...
0
votes
1answer
274 views

Use Batch file to Run exe and Output Results to Text

I have a program that runs from the cmd prompt that will run continuously as it is outputting text. I can have it output the text to a text file by adding > path\filename.ext to the end. I want ...
0
votes
0answers
83 views

automate drive mounting after Cisco AnyConnect client is connected

I have a request to write a bash script for clients to open VPN connection and automount remote drives. I am not sure how to approach it. I figured out I can use "vpncli.exe connect " to connect, but ...
0
votes
1answer
980 views

Create a Batch file (.bat) to search an string through multiple files

I am using Windows Server 2008 and I need to create a Batch file (.bat) to search for a given string in 20.000 to 30.000 files located all in one folder in the same level (without subfolders). I have ...
1
vote
0answers
42 views

How to hide error dialog box in 7zip?

I am using "C:\Program Files\7-Zip\7zG.exe" -y x -pmypassword "D:\Myfile.rar" -o"D:\Extracted Files\" for extracting a file encrypted with password. Now if 'mypassword' is not the correct password ...
2
votes
2answers
58 views

Delete file if found

I have a batch script with a line like this: del "%TARGET_DIR%\packages.config" But if packages.config does not exist in the target directory it produces an error. Could Not Find ...
0
votes
1answer
195 views

Bat file fails when file name has spaces

I have this batch file that process some video files in a batch. Things work just fine as long as the filename has no white spaces in it's name. If the file name (test movie.avi) has white space it ...
0
votes
4answers
3k views

Make batch file run in the background of the command prompt while continuing to use command prompt

I am use a windows command prompt for hours a day at work, and I want to spice things up. I want my text color to change color every 1 second. I have a batch script that does this. @echo off set ...
2
votes
2answers
1k views

batch - File last modification time with seconds

I want to know when a file has been modified for the last time. I can get these infos using the following batch script: FOR %%i IN (myfile) DO SET modif_time=%%~ti The problem is that I need ...
1
vote
1answer
237 views

Running vim script exits batch file? (Windows .BAT/.CMD)

Trying to run a vim script as part of a batch file with vim -u NONE -S dothis.vim but what is puzzling is that the batch file exits after this line instead of continuing with the next statement. ...
1
vote
0answers
213 views

Windows 8 “Insufficient memory” error whilst copying through .bat files

Info: Sys: Windows 8 Pro 64-bit (6.2, Build 9200) (9200.win8_gdr.130531-1504) BIOS: Default System BIOS Processor: Intel(R) Core(TM) i7 CPU ; 960 @ 3.20GHz (8 CPUs), ~3.2GHz Memory: 14336MB RAM ...
-1
votes
1answer
61 views

Removing folders with a batch-file

You will probably recognize the script below especially this command which was posted here over a year ago: for /f %%i in ('dir /a:d /s /b *PGP Corporation*') do echo rd /s %%i However, I am ...
0
votes
1answer
59 views

batch file to display nicely compare files results

I'm looking for a batch code to prepare a file with the differences between two files in a nice way, Maybe highlight individual lines in a different color, Does anyone have such a script?
1
vote
0answers
46 views

Sox not recognised as a command in W7

I just moved from xp-32bit to W7 64bit and re-installed sox which I use to resample and create spectrogams. The batch-file cd %~dp0 mkdir converted FOR %%A IN (%*) DO sox %%A -n spectrogram -o ...
1
vote
2answers
747 views

What causes SVN “Working copy <path> is locked”?

I wrote a console application that uses SharpSVN to update 3 folders in my repository. Wanted to convert that to a batch script to removed the dependency on SharpSVN. Came up with this: CD ...
1
vote
1answer
299 views

Changing virtual memory using batch

I am making a program using batch to boost pc performance and I have now come to the stage where I need to edit windows virtual memory to a size that I can change in the code. if needed it can be done ...
0
votes
1answer
298 views

Batch to prompt for folder name and command, redirect to TXT file

What I'm trying to accomplish, is to have the batch file prompt the user to input their specific folder on our team's directory, and then prompt for a specific command to be used, and redirected to a ...
0
votes
1answer
143 views

Batch to check if removable disks are connected. If yes, execute another command

I know how to check if there are removable disks connected with a CMD command wmic logicaldisk where drivetype=2 get deviceid, volumename, description But now I would like to make a batch that ...
0
votes
4answers
86 views

Find IP in error.log

I'm having trouble building a batch code for find IP in a log using a text filter. For example: this line from Apache web server error.log: [Fri Dec 13 23:32:47.531250 2013] [access_compat:error] ...