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

learn more… | top users | synonyms (1)

1
vote
1answer
13 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
12 views

How to merge images per day using gdal-merge and cmd(.bat file)

There are 4 to 5 projected images in one day. Let's say I have all the projected images for 3 days. For day 1, the file name are: T2010232034000.L2.Tera.tif T2010232035000.L2.Tera.tif ...
1
vote
1answer
24 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
15 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
0answers
12 views

how to delete log file after zipping in bat extension

Please check my code ... and suggest any changes to be made ... I am able to zip the logs but not able to delete those logs......... @echo off set zip="C:\Program Files\7-Zip\7z.exe" rem ...
1
vote
0answers
20 views

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

Basically, I want an application to launch only when another application's process is active.
0
votes
2answers
25 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
23 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
14 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
16 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 ...
0
votes
0answers
31 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
19 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
26 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
votes
0answers
22 views

Insert line breaks after number

I have the below code in my text file. Consumer Extract |: 10684 Campaign Extract |: 13018 Survey Response Extract |: 73300 Fullfillment Extract |: 220003 Now, is there any way that new line gets ...
1
vote
2answers
21 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 ...
-2
votes
0answers
21 views

Batch file to modify contents of a file [on hold]

I have the below text file Number of output records -: Consumer Extract |: TOTL_OUTPUT_REC: 10684 Number of output records -: Campaign Extract |: TOTL_OUTPUT_REC: 13018 Number of output records -: ...
0
votes
1answer
33 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
21 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
55 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
290 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 ...
0
votes
2answers
62 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
32 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
18 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
14 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
32 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
28 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
42 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
34 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
22 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
34 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
21 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
56 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
61 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
21 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
29 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
46 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?
1
vote
1answer
59 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
73 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
75 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
70 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
32 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
30 views

FOR, IF and SET all are not working together

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?
0
votes
1answer
41 views

String replace inside a for loop in bat script

The replace is go well in this script. I am trying to make it dynamic. SETLOCAL enabledelayedexpansion for /f "tokens=* delims= " %%a in ...
1
vote
0answers
87 views

Creating an account creation script to create new users in Windows Server 2008

I need to be able to make an account creation script that will create a new user in the Domain Users group, set its password, roaming profile, and login script. The input will be first name, last ...
2
votes
1answer
155 views

Windows cmd output redirection to standard input ( >&0 )

From a question on Stackoverflow, i've being testing with redirection from/to stdin stream. And this tests, trying to send data to the stdin stream, just to see what happens, end with an apparently ...
0
votes
2answers
62 views

Run other cmd in bat like from it's own path

I need to run bat(fix.bat) in cmd batch file (let's say sample.cmd on c:) The problem is that despite of using: start /WAIT cmd.exe /C D:\dev\sys\fix.bat fix.bat runs like from parent command ...
0
votes
0answers
20 views

Want to write batch script on the basis of system date and exit code

This is MY first question in this forum, Hope any one of you can fix the issue.. I have one log file containing the pattern as below "abcd.job" (abcd.bat) Started 27/8/2014 5:00:00 AM ...
0
votes
0answers
23 views

command for running script?

I was wondering what command would get the batch file to read a seperate text file and use all of that code in a database.. if that didn't make sense I'll do my best to explain: I have a text file ...
0
votes
1answer
76 views

Batch file to read a file and create a JSON?

I have a text file with some dozens of entries in the following format: code: SETX id: 1 msg: Message for setx code: SETY id: 2 msg: Message for sety msg_ja: Japanese message for sety As you can ...