Text file containing a sequence of commands or program invocations.

learn more… | top users | synonyms (1)

-1
votes
1answer
50 views

Batch file timer [closed]

I would like to know I there is any way to make a timer in a batch file where you press something and it does something and if you don't it does something else Thanks
0
votes
0answers
29 views

Losing credentials when adding echo off

I needed to map a drive to another domain and it worked perfectly, here is the batch file. net use W: \\com-p55.test.ad.testdom.com\software$ /USER:domain\username password /PERSISTENT:YES The ...
0
votes
1answer
662 views

How to delete loopback adaptor in Windows 7 using batch script?

I have created 10 loopback adaptors on Windows 7 using devcon devcon -r install %WINDIR%\Inf\Netloop.inf *MSLOOP I put this in for loop and every thing is ok but now I want to delete them using ...
2
votes
1answer
242 views

Reg.exe Offline registry edit

Ok I want to edit an offline registry entry from WinPE, if I am booted into the OS (32bit) the reg key is: hklm\system\currentcontrolset\services\mountmgr\noautomount So I boot into WinPE and run ...
1
vote
1answer
49 views

How to have a batch call another batch based on its location?

I have made a file I will put up for download. It involves one batch file calling another. Most of the time this is not a problem, but in my case I have no clue where they will download it. So how ...
0
votes
1answer
147 views

How to unhide a batch file

I am trying to make a .bat script that will unhide another .bat file in the same folder only once. I am making an auto backup for a game, but first I want the user to agree to Terms of Use and ...
5
votes
1answer
119 views

Why do my .BAT files on Windows 7 not PAUSE properly?

I've been playing around with writing batch files on my computer for some time, and I am confused about why PAUSE doesn't work like I thought(maybe I'm just doing it wrong idk, just really confused). ...
-1
votes
2answers
2k views

creating a batch file to run different codes sequentially

Im trying to create a .bat file with with different codes, each of these codes exceute different commands, but I don't want to run them separately but in one batch file. All my batch codes that ...
0
votes
1answer
76 views

Batch is starting too fast after reboot

So i have batch1 as this REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce /V 2 /D "%~d0\bat\batch2.bat /f and then I reboot the computer (Windows 8) and batch2 starts. It seems like ...
1
vote
1answer
68 views

How to save Ping record in every single hour for 2 weeks?

how do I save the record ping "in every single hour" for a certain period, for example for 2 weeks, with the format dd / mm / ss, dd / MM / YYYY and beside it is the result of the ping. So we can ...
0
votes
2answers
81 views

How to you tie different batch commands into one file to run sequentially

I have a 5 batch files but I want to put them all in one file to run one after the other consecutively. Is that possible? What is the command that can tie the different files together .. I don't want ...
2
votes
1answer
2k 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
146 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
841 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
98 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
30 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
77 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
265 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
75 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
264 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
100 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
46 views

check and warp newest files added

How am I going to automatically check all the files that were added to the directory and then warp it immediately?Because everyday I am downloading hdf files and warping it from time to time is a ...
2
votes
1answer
37 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
23 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
55 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
97 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
66 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
215 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
300 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
98 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
49 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 ...
1
vote
1answer
87 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
144 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
153 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
68 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
27 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
283 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
504 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 ...
4
votes
2answers
990 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
164 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
40 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
132 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
145 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
628 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
63 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
413 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
61 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
1answer
35 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
153 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
754 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 ...