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

learn more… | top users | synonyms (1)

0
votes
0answers
7 views

How to hide cmd window of a Calibre Content Server batch script?

So I manage to be able to share more than one Server Content at the same time with the same PC. If someone want to know how can I do this, is easy. Make a batch script and put this: @echo off ...
0
votes
0answers
23 views

How to use Batch script in Windows form application

I have a batch file written by me and it has some data and some locations of files in application folder, Now i want to write a windows form application in C# and if i want use that batch script in ...
0
votes
1answer
34 views

How to send mail from a Windows batch file

I want to send a mail from a Windows batch file. Here is my code: blat test.log -server smtp.gmx.com -to dest@gmail.com -f address@gmail.com -s "test mail" -u "address@gmail.com" -pw "password" ...
0
votes
1answer
30 views

Windows scheduled task - .bat runs forever

I've a scheduled task to clean up folders on a hard drive automatically; it removes files older than a certain amount of days. Basically it runs a .bat file full of lines that looks like this: ...
0
votes
0answers
25 views

Windows batch script: Manual power up vs Wake on Lan (WOL)

OK, I have a (win 7) desktop computer with WOL set up so I can turn it on remotely, it works fine. Next thing, on this computer I have a batch script, which runs at startup and starts various apps, ...
0
votes
0answers
15 views

How to install the tool(exe) and change settings in it using batch file?

I want to run the installation(which is a single step procedure) of one of the tool(exe file) then in that tool,select File -> Settings and do some settings(select one option(which is a Radio button) ...
1
vote
1answer
33 views

Executing a BAT file as a domain user from a service in Windows 7

Firstly a few basics: I am running a database server application which runs as a service ServiceA. ServiceA is installed on Server1 and Server2 ServiceA only runs on one of the two servers at any ...
0
votes
1answer
15 views

Batch file: Concatenating list of files from array

I have a list of files, say a, b and c. If I need to concatenate them in that order into a single file, I'd use: copy /B a+b+c outputfile How do I do the same if the filenames are in an array? Eg: ...
0
votes
0answers
16 views

Launching batch files from PortableApps

Being a big fan of PortableApps, and of Textpad, I noticed that later versions of Textpad, provided you have a valid license, allow you to create a portable version of it. So I did that, installed it, ...
-1
votes
1answer
18 views

Logging in to putty by sesu as superuser and running commands

I need to automate using a bat file where I need the following things to be done: log in to server using putty/plink sesu to super user run certain commands get the outpout in a text file I can ...
-2
votes
1answer
33 views

Loop Counter not working

@echo off setlocal enableextensions enabledelayedexpansion set /a eng_aud_count=0 set /a eng_sub_count=0 For /f "tokens=1-9 usebackq delims=.:^)^( skip=2" %%A in ("MY text File") do ( set trck=%%B ...
1
vote
0answers
34 views

Run a batch file on a remote computer as administrator

I am trying to run a batch file (to install some software) on a remote computer. To do this, I am using PSExec. psexec.exe \\COMPUTER C:\swsetup\install.bat This works fine, apart from some of ...
0
votes
1answer
11 views

Winzip without command line addon

I'm trying to untar a file and the software installed on the computer is Winzip, but I've been told that the command line addon isn't compatible with Windows Server 2003, so it isn't installed on it. ...
1
vote
0answers
41 views

CMD install based on OS type and architecture [closed]

I am looking for a way to do a CMD install based on OS type (XP, Vista, 7, 8) and architecture (x86 or x64). So for an example if the script detects the OS is Windows 7 x86 (regardless of ...
0
votes
2answers
52 views

Batch file rename with random alphanumeric

I am looking to rename a bunch of images (all with .jpg extention) with random alphanumeric names. Example would be 08kDRH1s.jpg or 0FwzUc3.jpg. Doing some searching I did find a few batch scripts ...
0
votes
0answers
14 views

Batch-file pseudo random

Is there a way to do pseudo-random in batch? Simple random is very bad for my program. It's better to looks like: call:random var 1 100
0
votes
1answer
56 views

Simple batch file fails on Windows Server 2012

On a Windows 2012 Server, from a logged-in Administrator (local and domain), created a batch file "test.bat" by redirecting console input into a file: echo Hello When run from PowerShell cmd prompt ...
2
votes
4answers
54 views

Batch file. Variable in variable

How to use variables in variables? This code: set newvar=%var%var2%% doesn't work. So, what to do? I can't write my program without it.
0
votes
1answer
38 views

Batch file. If statements in if statements

I am trying to write this code: If %dropmode%==on ( If %drop% LEQ %potiondrop% ( set /a potion=%potion%+1 ) If %drop2% LEQ %potiondrop% ( set /a potion=%potion%+1 ) ) So, condition "if %drop2% LEQ ...
0
votes
0answers
21 views

assign drive letter via batch fil based on label

I need a script which would change the drive letter to e.g. P:\ of an USB drive named e.g. "MY_VOLUME". I know this is somehow possible with diskpart /s script.txt > output.txt (using: "list volume" ...
0
votes
0answers
28 views

Using a .bat file to pull a string from a text file within a zip folder

So, please bear with me. This is only the second batch file I've ever written and my first post anywhere on StackExchange. I'm writing a batch file that tells a remote server to run HP Array ...
1
vote
1answer
27 views

Windows 7 batch file to read filenames from a text file and create the file

I have a text file which will have one filename per line. I want to run a batch file that will; - read a line - test to see if the file exists in the current directory - if not, create the named file ...
0
votes
1answer
29 views

.bat file to create a Library with icon in Windows 7 and 8

Is it possible to create a .bat file that creates a Library with an icon in Windows 7 and 8. Of course this can be done by following the already created tutorials online like Change Your Windows 7 ...
0
votes
0answers
2 views

Stuck in infinite loop after executing oracle export in java? [migrated]

I have been searching through net, how to make proper export using exec in java. Here is the code I am use for that: private static void execute(String string) { // TODO Auto-generated method ...
-1
votes
1answer
35 views

I still use MS DOS style batch files (.bat) What should i be using these days, instead? [closed]

Surely there better substitutes out there for this kind of simple scripting on windows? I've tried googling but just get stuff about editing old batch files.
1
vote
1answer
30 views

batch script to swap words / rename files

could someone help me please? I have win xp and bunch of e-books named like this: Title - Name Surname.mobi and I need a BAT file to get: Surname Name - Title.mobi I am almost able to swap what´s ...
-1
votes
1answer
45 views

What comand do I enter into my batch file to do this?

I want my batch file to find a string in a file and return it to the next line in my batch file. How can I do this? I've googled over and over but can't get the specific answer I need with the ...
0
votes
0answers
24 views

Prevent Firefox's “Well this is embarrassing” screen from appearing at first login only

My parents have Windows 7, Firefox 30 and two user accounts which they regularly flip between and then shutdown the computer. As a result the "well this is embarrassing" page appears frequently when ...
0
votes
2answers
85 views

How do I concatenate files using a list and batch?

I need the equivalent of the shell command xargs < list.txt cat -- > compiled.txt as a Windows batch file. There is a directory full of text files (about 50 to 500 files) that I need to ...
0
votes
1answer
49 views

how to batch change date created to date modified

I have many video files ending with extensions mov, avi, mp4, and mts. I need to change their "date created" to their "date modified value" I tried using the following powerhsell script: ...
2
votes
2answers
58 views

Start program, wait until it outputs certain string, then continue

I want my batch script to run a batch script, which doesn't terminate, then run several more batch scripts, which do terminate, and then close the first batch script. The issue is, the first batch ...
0
votes
1answer
25 views

Get size of a file and save it to a variable in Windows console?

I'm making a windows batch script, I need to get the specific size of a file so I can Insert that and other values I already got to a database, but I just can't figure out the proper way to do it. ...
0
votes
2answers
57 views

Automatically reboot Windows8 if no internet activity

I have a media server located in a very inconvenient part of my house. Occasionally I will have to reset my router or it will reset itself. The issue is the PC loses connectivity for some reason, and ...
0
votes
0answers
17 views

How to save a document and close it after the save

Currently I have a .bat file that opens a program, opens a document and then reloads this document so it contains new data. After that I need a timeout so it can run some other things within the ...
1
vote
0answers
33 views

How to open a webpage if it isn't already open, and if it is, switch to it instead?

I am currently executing this command in my batch file "C:\Program Files (x86)\Internet Explorer\iexplore.exe" "http://localhost" to open up my page in Internet Explorer after generating it and ...
0
votes
1answer
141 views

How to automatically enter username and password for network location in batch file?

I have a batch file that copies files to a network location on WebDAV. The address looks something like this: \\xxxxxxxxx.net@SSL@2078\DavWWWRoot When I restart my computer, the batch file doesn't ...
1
vote
0answers
35 views

Windows / Create txt files of subfolders with file names in it

I have a folder on my HDD that contains like 1000 or so subfolders. These subfolders contain files and sometimes more subfolders. Now what I want to have is a script that creates a .txt file for each ...
-1
votes
1answer
21 views

Is there a way to read a simple one line asp page using a batch file?

I have a simple asp page in which i write an ip address, and nothing more. Now i need a batch file to read the contents of this page and pass it to a variable. I'm not good with batch files but ...
1
vote
0answers
111 views

Running Batch file from servers network share - using servers local user account

I am trying to create a script that could be run from servers network share and promt me to type servers local username and password as credentials. So, .bat file is located at ...
0
votes
1answer
59 views

xcopy command does not work in a batch file

The command below works in CMD Prompt, but does not work in a batch file. xcopy "D:\Desenvolvimento\Repositórios GIT\driverXD\app\*" driverxd\ /e
1
vote
1answer
59 views

Is there a script "to log remote users off and after log them off to delete their profiles?

I found 6 simple scripts (.bat and .vbs) for remote pcs (Win XP and 7) to Clean Profile properly and faultlessly: Script: sending Ping to check Remote PC On or Off (.bat) Script: checking who logged ...
0
votes
1answer
105 views

7z in batch file with variables “Incorrect command line”

I'm trying to run the following batch file: set HH=%time:~0,2% set HH=%HH: =0% IF %time:~0,2% GTR 5 ( IF %time:~0,2% LSS 21 ( FOR /F "TOKENS=1 DELIMS=:" %%A IN ('TIME/T') DO SET HH=%%A XCOPY ...
0
votes
1answer
28 views

Kill all internet explorer's belonging to the current user

What's the proper way to shut down all of the instances of internet explorer for the current user using batch commands? I have this. There can be multiple users logged into the same computer. What am ...
1
vote
1answer
55 views

CMD Command to create folder for each file and move file into folder

I need a command that can be run from the command line to create a folder for each file (based on the file-name) in a directory and then move the file into the newly created folders. Example : ...
0
votes
1answer
103 views

Script to enable/disable IPv4 on a specific network adapter Win 7

For reasons I don't wish to get in to at the moment I need to occasionally disable Internet Protocol Version 4 (IPv4) on my wireless card, then enable it some time later. Currently I go into the ...
0
votes
1answer
49 views

having problems clearing a directory and uploading files via a batch file

I am running Filezilla-Server on a Windows 2012R2 Standard server. I am attempting to ftp in and send files from another Windows 2012R2 Standard server. I am running this batch file: @echo off cls ...
3
votes
1answer
115 views

Creating a batch OR .bat file to linearize and merge PDFs using QPDF.exe

I am trying to create a batch OR .bat file that will linearize MULTIPLE PDF files. I already have a script I commandeered that uses PDFTK that sends PDFs to the 'sendto' folder where they are ...
0
votes
0answers
62 views

android.bat is not recognized as an internal or external command

I have setup up the environment for cocos2d-x. I have edited the create-android-project.bat file according to my Cygwin, SDK and NDK locations. Now when I try to create a new cocos2d-x project double ...
1
vote
1answer
66 views

Opening a text file in notepad++ and refreshing it at regular interval of time using a bat file

i want to open a text document in notepad++ through bat file which i have achieved . this is the command i am using to open a file. %SystemRoot%\explorer.exe "D:\path of file\file.log" Secondly as ...
0
votes
1answer
50 views

Need help creating a .bat file to execute SAS jobs

Using Windows 7, I need a .bat file that will execute files in a folder whenever I put them in there. for example I want it to execute files with a .sas suffix and then rename them once executed. I ...