Batch processing is the execution of a set of commands or software programs without user intervention. A batch file is a text file containing a sequence of such commands or programs invocations.

learn more… | top users | synonyms

1
vote
1answer
38 views

WMIC |more has extra rows when .csv opened in Excel

I am trying to output the name and version of each program installed on my system to a .csv file. I could do something more complicated with VBScript, but would prefer to keep this very simple to ...
0
votes
1answer
22 views

Automatically enable telnet services with batch

Even after installing telnet it will not work until you go services.msc and enable Telnet by changing the setting to automatic. Is there a way I can do this preferably with cmd or otherwise with ...
2
votes
0answers
40 views

What are the underlying Windows7 mechanics that are responsible for opening selected files via key 'Enter'?

I need to create a batch script that opens n files, of same type and same suffix, with program p, without creating n instances of p (i. e. use multiple tabs instead of multiple instances). For some ...
0
votes
3answers
50 views

Have the command prompt launch an application like Notepad and block until it is closed

I have a Batch script I essentially want it to present the user with a notepad window opened with a configuration file for the user to edit each time they run the script, and I want the Command Prompt ...
2
votes
3answers
46 views

Parse string using batch script

How can I parse string using batch script? Goal is to save in a array everything under Import: and strip out #head for example --> //MPackages/Project/config/abc.txt and ...
0
votes
1answer
14 views

NET USE remove if no right

I have a .bat for connecting network drives. I have 11 in total. My script works, but for now even if the user has no rights, that it connect the network drive. I would like if the user does not have ...
0
votes
1answer
13 views

pushd with rd dont work as I want

have done like this pushd \\somedrive.se\Install\Paket\XXX\ echo "start..." for /f %i in ('dir /a:d /b bu* ') do echo /q %i popd and get this output when running from a script: ...
0
votes
1answer
40 views

Windows: How can I use the command line to set registry permissions

OS: Windows 7 Desirable Method: Command Line Other acceptable methods: VBScript How can I use the command line to set registry permissions? I found the REGINI utility, but I'm not having any luck ...
0
votes
2answers
55 views

Batch - How to cat multiple files together without header records

I'm attempting to merge multiple files together with the following command: copy test1.txt+test2.txt test3.txt This works just fine, however, the files I'm attempting to merge contain header records ...
2
votes
1answer
33 views

How to crop images in batch and then re-crop the same way

I am getting automatically generated screenshots of our application, some of which need cropping, since they may only relate to a pop up window or some small portion of the screen. Is there some way ...
0
votes
0answers
21 views

Why isn't XCopy command working in batch file?

I am trying to run a simple xcopy batch script but I am facing some difficulties. Here is the script; SET SRC=C:\FOLDER1\FOLDER2 SET DEST=V:\FOLDER1 FOR /D %%d in (%SRC%\*) do xcopy /S /I /y ...
1
vote
3answers
18 views

using tr from coreutils for windows

I have to transform contents of file from \ to \\ on Windows in script. So I got Coreutils and tried to use tr \ \\ < file_in > file_out on Windows CMD, but \ in file_out remainde \ instead of ...
1
vote
5answers
85 views

How to find process pid of an application

I have portable version of an app. I have ran for example 5 multiple instances of it and they all have the same process name but different pids. I want to find a way to for example kill one specific ...
0
votes
1answer
19 views

Appending an extension to a new file created with xcopy

I've been having problems with xcopy in the past few days, and I'd like to stop ripping out my hair. In my DOS class, a portion of an assignment requires a file to be copied (with xcopy), and the new ...
1
vote
1answer
78 views

Making Batch to run Windows PowerShell, then have it run some text

I am newer to making batch files. I am trying to run a command that will open windows PowerShell in a specific directory, and then once there to run a command. So far I have the following. ...
1
vote
0answers
29 views

WIX: Run batch file based on checkbox value with admin right

I created a installer using WIX. However, after installing the software, I have a checkbox asking the user whether to run a batch file or not. If the user check the checkbox, the batch file will run. ...
-3
votes
3answers
27 views

Batch Files make Directory within Directory

How would you create a directory inside of a directory in batch files? I've tried various times and I couldn't get it to work. Please help.
2
votes
1answer
38 views

Batch command to archive folders with content using WinRaR

I have lot of folders in the root "C:\Test\Archiv\" (more than 1000). To be more specific, I get one every hour. They are named as following : ay %year% m %month% d %day% h%hour% In each folders are ...
0
votes
1answer
16 views

Is it possible to filter attribute of dos command output?

Below is output of this command netsh interface ipv4 show interface ...
-2
votes
1answer
86 views

How to download from a direct link using batch files and Google Chrome? [duplicate]

I want to create a batch file which is capable of downloading any files from direct links. I already tried this: chrome start ...
0
votes
1answer
39 views

How do I make exclamation marks show using echo

Earlier today, I was continuing on making an RAR Password Decryptor. I was testing it out on a test RAR file with the password being just an exclamation mark but when I use my Decryptor all it says is ...
2
votes
1answer
57 views

Batch - Renaming network interfaces based on index with WMIC and netsh

I have two Intel NIC's that I need to rename based on their index numbers, WMIC is nice in that it seems to always return index numbers in numerical order so we can take the output directly without ...
1
vote
1answer
38 views

Batch file FOR command skipping lines

I need some help with the FOR command in batch filing. What I want to do is read the file "Test.txt" and read only the third line and turn it into a usable variable within this batch file. Here is ...
0
votes
0answers
35 views

How to append output from sqlcmd argument to txt file?

I am 100% new to batch files, so bear with me. sqlcmd -U %username% -P %pw% -S ServerName -d TableName -i "%%G" >> output.txt This doesn't work. It works fine without the >>. The error ...
2
votes
2answers
33 views

How do I detect the number of parameters to a batch file and loop through them?

Is there an easy way to detect the number of parameters passed as arguments to a batch file, and then use for /L to loop through them?
1
vote
1answer
58 views

Batch create PDFs by combining all PDFs in folders [duplicate]

I have hundreds of folders full of PDFs. I would like to create a PDF out of each folder called the name of that folder. For example, "folder_name_1" has 10 PDFs. I want to convert it to a PDF ...
0
votes
0answers
39 views

batch script to list local hard drives and then do a dir command on each drive

I tried to make a script following this topic "batch script to find drive letter of a mounted device" With help of one stackoverflow user we got the script running. This is the script: @echo off ...
3
votes
2answers
95 views

Command Line : Concatenate multiple files by date

I have got a plenty of .txt files in a directory. The directory also contains .png and some .pdf files. I have successfully concatenated .txt files using this command : @ECHO Off SETLOCAL for /r %%f ...
0
votes
2answers
30 views

Windows Batch File to move contents based on file type

I was figuring out a way to manage my downloaded files from chrome.I want that my pdf file should save in ABC directory, audio file should save in XYZ directory etc.I thought a way to do so through ...
1
vote
1answer
46 views

Windows Batch to read TXT and parse lines to CSV

I've made a good deal of headway by searching this site and learning the ridiculous language that is Windows batch scripting, but frankly I'm stuck. The sample below is from our lab's old radiometer ...
0
votes
0answers
53 views

Windows Batch file nested IF statement running both IF and THEN

Not sure why this nested IF statement won't work right. I can't find any issues with it. The Last code block actually works properly, not sure why the first one doesn't. The first script is running ...
1
vote
1answer
39 views

Windows Batch to read TXT and parse lines into JSON

I've made a good deal of headway by searching this site and learning the ridiculous language that is Windows batch scripting, but frankly I'm stuck. The sample below is from our lab's old radiometer ...
1
vote
1answer
56 views

how to make a batch file close automatically

I have a .bat file which its content is like this: @echo off nc x.x.x.x 23 < commands.txt exit in which nc is a .exe file in the same directory nc.exe known as NetCat. The commands.txt file ...
0
votes
1answer
33 views

Disable Sharing Wizard with Batch?

How can I disable the Sharing Wizard option that's win the Folders Options? I want to be able to disable it with a batch command. Any help is appreciated!
-2
votes
1answer
39 views

I need a batch to open an file whenever the workstation is unlocked

So the batch file I need has to open an excel file whenever the password is typed to unlock the computer.I know this thing can be done with Task Scheduler but I need a batch file because this action ...
1
vote
3answers
178 views

Is there a way to open a website URL from a text file that lists 600+ URIs via a batch file?

How could I write a Windows batch script that could allow me to open an URL, with a browser—Firefox or Chrome—from a txt file containing all the URIs? The point is: I would like the script to open ...
0
votes
1answer
62 views

Progress indicator in a batch file while tracert runs

I have a batch file that runs fairly quickly, BUT there are a couple tracer's that take forever to run. I want to find a way to show that something is happening (NOT showing the tracert results ...
0
votes
1answer
33 views

Suppress output of nslookup command in batch file

Trying to cleanup my batch file... Having problems with the following command still printing out some info: FOR /F "tokens=2" %%a in ('nslookup myip.opendns.com resolver1.opendns.com') do (set ...
0
votes
2answers
39 views

How to write decisions on batch files?

I use batch files a lot to make my computer do things for me. But mostly i make it do things that I've already decided. Like opening my hidden file if I'm alone, or start playing a specific playlist. ...
0
votes
1answer
28 views

Run a command in all sub-folders in a batch file

I have a batchfile that looks like this: IF EXIST icon.ico ( attrib -S -H -R desktop.ini echo f | xcopy /H /Y "%~dp0desktop.ini.txt" desktop.ini attrib +S +H +A desktop.ini ) This works ...
0
votes
2answers
147 views

Windows Command line get disk space in GB

I'm trying to create a batch file to pull the total size and free space of the C:\ drive of servers (locally run script). I also need the output to be easily readable, so bytes is not going to work, ...
0
votes
3answers
45 views

Recursively move files to relative subfolder

I've looked around for topics about this but I fail to achieve want I need. Any solution, either in Ubuntu or in Windows cmd would be greatly appreciated. The current structure is /folderA/*.txt ...
0
votes
1answer
58 views

Macros doesn't load on powerpoint startup

I have created a powerpoint macros to run a batch file when slideshow starts. This is my code Sub OnSlideShowPageChange(ByVal SSW As SlideShowWindow) If SSW.View.CurrentShowPosition = _ ...
1
vote
2answers
28 views

How do I move files not accessed for a long time using a batch file?

I like to move files accessed for a long time. For instance: if I do not access some file by 7 days, it move to old sub-folder. file1.txt 1 days <keep> file2.txt 2 days ...
0
votes
1answer
38 views

Sending the command to run a batch file from web(remotely)

Is it possible for me to make my computer run a batch file through a web command? To make it more clear let me try to explain what i am trying to achieve. I want to run a squid proxy server on a ...
0
votes
2answers
30 views

Creating Directory Dynamically by using Windows Batch File

I have a question over here that I wish to achieve. Let's say the scenario looks like this: In BuildFolder there are these files: Z:\BuildFolder\Build#170 Z:\BuildFolder\Build#171 ...
0
votes
1answer
23 views

How to batch check audio files can play

Background: I have ripped my CD collection to FLAC but I had a drive error which were repaired with the standard windows tool. Error was likely due to unplugging before safe removal. I want to be ...
0
votes
1answer
26 views

Batch command returning weird error

I have been spending hours working on a command to iterate through sub-folders and find what you searched for, but it is returning this: Searching for: Text Doc.txt C:\Users\Tyler\Desktop\"Text ...
0
votes
0answers
15 views

Scale multiple DXF CAD files in AutoCAD?

I have a few thousand DXF CAD files that need to be scaled from imperial (inches) to metric (millimeters). The scale factor is fixed. Is there a way to scale all these files in batch via AutoCAD ...
0
votes
2answers
40 views

Windows shell to play (enqueue) all video files in correct order

I'm burning series on a DVD. I'd like to include Play all option to play them all. Of course, this should work for any player the system has installed. What I'm trying to do is to invoke the very ...