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

learn more… | top users | synonyms (1)

2
votes
1answer
293 views

Batch delete temporary Windows files (system, browsers, cache, etc) for all users

Is anyone in this community using a particular technique to achieve batch deletion of temporary data (such as Windows temp folders, browsers cache, etc) for all users? The tricky part seems to be: ...
0
votes
2answers
45 views

send output of batch file to current directory

I have a .bat script that concats some text files into one big file. I would like to have the resulting file go to the current directory instead of the hardcoded path. Here is my script: @echo off ...
1
vote
2answers
116 views

How can I zero-pad numbers in a Batch FOR loop?

I am writing a batch file to do some operations on remote computers in my building. They are all named with the same prefix, but the number at the end changes (01–65). I tried to follow an online ...
1
vote
0answers
54 views

Unable to send files over 1 MB via FTP on Windows

I tried to send multiple files via FTP commands using simple batch script. It works fine when the file size is less than 1 MB but when the file is larger than 1 MB I get the following error log. ...
0
votes
0answers
15 views

Automate the closure/reopening of browser windows

Aim:- To have an internet browser logged in to a live stream and automatically close at a set time, then reopen a new browser window to a different URL also logged in to a live stream. These windows ...
0
votes
0answers
29 views

Batch ren Command - Only Rename Files with This Pattern

There's a program I use that renames some files to a random string on each use. It's annoying, and I can't get it fixed, so I wrote a script to change them back when I'm done using the program. The ...
0
votes
2answers
62 views

Batch file, script or shortcut to delete the most recent file in a specified folder

anyone know how to make a batch file or script or some other simple thing like a shortcut that calls some exe to do the following: I want to click on something (batch file, script or shortcut) that ...
0
votes
0answers
33 views

Windows 7 adding context menu entry

I followed this tutorial which explains how to lock an unlocked bitLocker drive without restarting explorer. This works perfectly. However, when I click "Lock Drive" in the context menu I get: ...
1
vote
1answer
140 views

Batch file to combine pdf files in alphabetical order

I want to create a batch file to combine selected pdf files in alphabetical order. Currently I have the following script: @echo off setlocal enabledelayedexpansion FOR %%A IN (%*) DO (set ...
2
votes
1answer
46 views

Windows batch equivalent of bash's set -e

Is there a Windows batch equivalent to bash's set -e, which causes the shell to exit immediately if a command fails with nonzero exit status (except in places where it's expected like in an if ...
2
votes
1answer
39 views

How to project all the files or newest files that were added to the directory using gdalwarp and commandline(.bat file)

How am I going to automatically detect all the files that were added to the directory and then project it immediately?Because everyday I am downloading hdf files and then project it from time to time ...
2
votes
1answer
30 views

How to add addional IP addresses to an interface through batch file

I have assigned a IP address to my LAN interface through netsh int ip set address "LAN" static 192.168.0.99 255.255.255.0 192.168.0.1 Now I want to add 192.168.4.20 with gateway 192.168.4.1 to the ...
1
vote
0answers
22 views

How can I set it so that another program launches at the same time as another? [closed]

Basically, I want an application to launch only when another application's process is active.
0
votes
2answers
31 views

stopping/killing a process using command prompt without knowing the PID

I am starting a notepad from command prompt using the command: start notepad I am not aware of the PID of this instance of notepad. In such a case, how can I close the same instance of notepad using ...
0
votes
1answer
47 views

Batch Script Doesnt Delete Folders in a Folder .txt File :(

My batch file's code is: for /f "delims=" %%f in (7profiledeletelist.txt) do rd /s /q "%%f" PAUSE exit In "7profiledeletelist.txt", there are: (will be deleted) C:\Users\1* (I tried *.* it didnt ...
1
vote
1answer
20 views

How do I delete directory trees on remote via bat file?

I saw the question "How do I delete directory trees via console on Windows 7?" Would like to do the same thing with the following exceptions: The directory exists on an external drive . The path to ...
0
votes
0answers
78 views

Getting output of command and error code with psexec

I'm trying to run a script remotely. What I want is the output (text & error code) of the script. Instead, I am getting D:\BatchScripts\myscript.bat exited on \\my.test.place with error code 0. I ...
1
vote
1answer
64 views

Batch file for configuring the ip address and removing it

My pc has a network configuration IP- 192.168.0.99 192.168.4.20 Mask- 255.255.255.0 255.255.255.0 Gateway- 192.168.0.1 192.168.4.1 I am connecting to the internet through the ...
0
votes
0answers
43 views

Command to output its backend process

I have an application running in windows that has an option to run a command (UI base). I'm pretty sure that the UI base backend is running in a cmd but I dont know what is the exact bin file. The ...
3
votes
1answer
32 views

Index files and folders in windows

I want to create a database of all files and folders within a specific location (say, E:\movies). How can I do this? Is there any software which can do this for me? Otherwise do I need to write code ...
0
votes
0answers
41 views

How can I get ConEmu to open more than 30 tabs?

I have a .bat file which opens 100+ consoles, but I need them in new tabs. Problem is, ConEmu has a max of 30 tabs. I can do this with regular cmd, but its 100+ new windows. I'd prefer them in tabs ...
1
vote
2answers
35 views

Batch Script 32 bit limitation of integer

Is there any way I can over come the 32 bit limitation of integer math operation of Batch. I am doing some addition operation in my script and the sum value becomes more than the range( 2^31 -1). I ...
1
vote
0answers
52 views

Batch check if IP is within specific range

I'm trying to make a batch script to get local IP-address of active NIC (could be wireless or local). To get IP adress I have used following line: FOR /F "delims=[] tokens=2" %%a in ('ping -4 ...
0
votes
2answers
47 views

Install from a .bat file

I have an old Mecer Notebook, at the school where I work, that is running Windows XP. My Principal has forgotten the password, but has asked me to see if I can get it working. I have tried everything! ...
0
votes
2answers
24 views

Remove New Line at the beginning and '-' from the contents of file

I have a file with the below output. ---------- PFIZ_EXT_SEAGRCLMHISD_20141013_1.TXT: 165428 ---------- PFIZ_EXT_SEBMODCHKIND_20141013_1.TXT: 0 ---------- ...
4
votes
2answers
147 views

Replacing certain word in text file using Batch file

I am trying to use a batch file to determine the currently installed drive letter and to replace a keyword in the ini file with the drive letter. Basically the ini file contains: [app] ...
2
votes
1answer
345 views

How to remove .bat extension from file name in a parameter?

I made a bat file and during execution, it displays a title in the command window. The title includes the bat filename, and it is displayed in full, including the .bat extension. The code I'm ...
3
votes
2answers
168 views

The Directory name is too long in batch

I already asked the question in stack overflow, but did not get any answer from anyone. So i am asking the same question here also. I am trying make a program which will calculate size of all folder ...
0
votes
0answers
47 views

Bitsadmin Download Error

I saw a feed referring to downloading via bitsadmin (v.7.5.7601.17514) on Windows 7. I have trouble implementing this myself and continue to get errors when running the code when running from a batch ...
2
votes
1answer
24 views

Batch file - file name extract

I can get the jpg file names extracted to a text file using : for %%a in (*.jpg) do echo %%a >> get_files.txt and this is the output : Seedling-Acacia-Acinacea-Gold-Dust-Wattle-2-months.jpg ...
0
votes
1answer
35 views

skip header line and replace string in text file in batch script

@echo off setlocal enableextensions disabledelayedexpansion for /r %f in (xis_*) do More +1 %~nxf >> No_header_%~nxf set "search=:20:" set "replace={:20:" for /f "delims=" %%i ...
0
votes
0answers
49 views

How to execute batch script in windows right?

According this answer in How do I delete a folder which is nested quite deep and avoid “File name too long”?, I created 1.bat file with following source: @echo off if not (%1)==() cd %1 for /D %%i in ...
0
votes
0answers
121 views

Create VPN connection using batch

Is there a way to make a batch file that creates a VPN connection? I just need it to accept the Internet address and Destination name, and make a VPN based on that. It'd also be great to get the ...
0
votes
2answers
50 views

Alter CSV file in Windows

Is it possible to read the contents of .csv and add another column data for every record ?. Example : The input CSV will have the following contents Row 1 : C1 C2 C3 C4 <C5> ........... Is ...
-1
votes
2answers
66 views

How can I loop through all sub folder of FolderA and execute a command do check modified files

I have a cvs client through which I can get list of modified files within a directory. For example: My workspace(Top folder) -" D/MyWorkspace" My Project A(Sub Folder) - D/MyWorkspcace/AProject ...
0
votes
1answer
30 views

Is there a way to reverse lookup which executable is being called?

I have multiple JDK's installed on my machine and I'm running on a system that has a pretty long path environment variable. Is there a way to see what my call to java resolves to? I'm looking for ...
0
votes
0answers
46 views

General-purpose For-Loop Windows batch command with User Input

How can I use as "input" over each file in a directory using a for-loop as "output" in its subfolder? I think the answer of this question will be very helpful, so I will give general-purpose example: ...
0
votes
1answer
29 views

Append Text to all blank files in a folder

I have a folder containing blank files, all the files have a .BAK extension Now I have a batch script that needs to write arbitrary text top each of the blank files, and I am using the following: ...
3
votes
1answer
73 views

Why are some .bat files “run as an administrator” bold in Windows 8?

When I right click on some .bat files the "run as administrator" selection is bold. Why is this? How do I make it so that all .bat files act that way too?
0
votes
1answer
129 views

How can I apply quotes to a URL in a .bat script?

The general form of a curl command in CMD that works is: curl -o latest.dump -L ...
2
votes
1answer
34 views

How to change directory to unknown subdirectory

I'm writing a short batch program to copy *.doc The files are in directories where it's name can be changed. In each directory, only have one folder only. If in DOS command window, i'll just key-in ...
0
votes
1answer
60 views

Run a command in a batch file on the system clock

I have two different connection for my internet connection. The first uses from 7am to 10pm. The second uses from 10 pm to 7 am the next day. And for each of the connections I've made a batch file ...
0
votes
2answers
83 views

Pass shortcut arguments in .bat (batch)

In a .exe shortcut, I can use extra arguments. But how to pass those arguments in a .bat file?
3
votes
1answer
453 views

How to write into a Log file from the batch file?

I have a batch file that triggers process in Access database. I'd like to write into a log file (just some *.txt file saved in the same folder) time when before the process started and after it was ...
0
votes
0answers
17 views

Associate files with batch script [duplicate]

I've got a .bat-file which expects an input file as a command line argument, i.e. script.bat input.key I associated .key-files with script.bat in Windows and I excepted the same behavior like I ...
2
votes
2answers
113 views

Batch File to start .exe when a specific number of files is in monitored folder

I am trying to write a batch file that will trigger an exe whenever there are exactly 4 jpg images in a folder. Afterwards the images should be deleted. I have got it to work it seems, but the file ...
-1
votes
2answers
150 views

Windows 8.1 - How to open a batch from a batch with different admin privileges?

I must run a bat which calls a program. Problem is I need to run the BAT as admin and call the program WITHOUT admin. I don't know why but it I call the program as admin it gives me a path error when ...
0
votes
1answer
198 views

Windows script to toggle automatic configuration script checkbox without removing any existing string value

I'm trying to create a bat file to toggle the automatic configuration script checkbox in Internet Explorer (see red box in screenshot)...but without removing any existing value in the related textbox ...
1
vote
1answer
39 views

How to list specific dated folders in a root folder to use with wzzip (winzip) command line in my batch script?

What I am looking to do is, using winzip command line (wzzip) inside my batch script, and zip any folders that have 201409 (That is Sept 2014)(for example) in the folder name into one zip file. There ...
0
votes
1answer
33 views

FOR, IF and SET all are not working together [duplicate]

SETLOCAL EnableDelayedExpansion FOR %%A IN (1 2 3) DO ( IF %%A EQU 1 ( SET CHOICE1=ABC ECHO CHOICE1=%CHOICE1% ) ) Output: CHOICE1= Why is CHOICE1 not getting set?