Text file containing a sequence of commands or program invocations.

learn more… | top users | synonyms (1)

1
vote
2answers
128 views

Escaping the < sign with ^ does not work in .bat file

I'm trying to write a batch file that can generate some XML config files, but escaping the < and > signs does not seem to work. At the start of my script i wrote a test: SET ...
1
vote
1answer
28 views

How do I use VLC Command Line In Windows Batch Line Without Showing GUI?

I want to use the following to convert some M4A files to MP3. It works fine, but it displays the VLC GUI for each file and shows 'quit' as a second file to be converted. Is there a 'silent' mode, ...
0
votes
1answer
24 views

Search and replace “overwrite” bulk pdf files back to a directory tree in Windows

I have hundreds of PDF files I used an application to apply watermark to, however, the application only succeeded to apply watermarks by applying a copy of each pdf file off the directory tree and ...
0
votes
2answers
37 views

How do I rename multiple files on Windows? [duplicate]

I have 2800 files, all of whose names start with a four-digit number followed by " - ", and I want to delete all those leading numbers from all the files, leaving only the alphanumeric file names1.  ...
0
votes
0answers
11 views

Batch copy files from client list to my server

Could you help me to create batch file to get information from client to server. I have 10 clients such as 1. CU01 2. CU02 3. CU03 . . . 10.CU10 I would like to copy file from 10 clients on ...
-1
votes
1answer
32 views

Batch: Random pick a name from a .txt file

I have a list of names and I want Batch to pick a random one from another file, then echo it back.
1
vote
1answer
26 views

.bat file to run and stop a background process in windows

I want to bundle two simple windows bat files with my PHP app that can start and stop a PHP builtin web server to test the app on localhost. This is what I've got on winlaunch.bat so far: php.exe -S ...
0
votes
1answer
24 views

restore bat file default, change its edit

I have windows 7 64-bit, I've been trying to figure out how to set up a bat file to run with admin privilege so my wife can back up her computer by just clicking on it. It's been a journey. I'm a ...
0
votes
1answer
20 views

reg add saves incorrect value for file association

Run from Admin this code works in Windows XP. set app=ExtrNS.exe set nam=ExtrNS@ REG ADD "HKLM\SOFTWARE\Classes\Directory\shell\%nam%\command" /v "" /t REG_SZ /d """"%CD%\ExtrNS.exe""" """%%1"" /f ...
1
vote
3answers
31 views

Start a Command Prompt and then change the title of it via batch file?

I'm trying to start a command prompt via a batch file, echo some text, and change the title of the command prompt. I'm trying: start cmd /k echo This is a terminal /k title Terminal The echo text ...
0
votes
1answer
39 views

Batch to reassign drive letter based on volume name

I have a "WINPE" volume and I am trying to get a batch script that will assign it drive letter "Z:" Someone gave me the script below but it does not work for /f %%D in ('wmic volume get ...
2
votes
1answer
24 views

Copy the most recent of two files with Windows command line

I have a Windows directory which contains 4 files in total. The file names are as follows: Address_1502.csv Address_1602.csv Site_1502.csv Site_1602.csv The prefix of the file name never changes ...
1
vote
1answer
19 views

How to make a batch file that takes in arguments and executes findstr using user input and shows results

This is intended to make a search easier on an individual, and the command line makes people give up. How could I go about having user input be passed through findstr by just using batch files?
-1
votes
0answers
9 views

How to record echo mssage displayed on command prompt using C#? [migrated]

I am using below function to call EAR_Encrypt_FTP.bat in C#. Is there any way to trace the echo messages dispayed in cmd.exe while running the batch file?? I need to process echo messages displayed ...
0
votes
1answer
32 views

Check whether FTP upload is successful or not using batch?

I am running below code in my ftpUpload.bat. If file is not uploaded to FTP server it should print "FTP upload is failed" but I am getting "FTP upload is successful" for both cases. What change I need ...
1
vote
1answer
32 views

Maximum setlocal recursion level reached. Can't print more then 30 times?

I want to print a defined number of passwords to a file. The code I found on this site is made for 30 loops as I see and I want to print much more, say, 1000. After a few runs, I get this, error? ...
-2
votes
1answer
32 views

How do I copy folders between two Windows servers? [closed]

I would like copy the folder from another server? (Both are windows Physical servers) Here is the scenario: I want to copy the folder from server1 to server2 everyday Server 1 is the source server ...
0
votes
1answer
27 views

What does “-install” do in the command prompt?

At my job, the procedure to transform a .bat file into a windows service is described as: -Start the command prompt as an Administrator -Type the following command ActiveTask.bat -install I have ...
1
vote
0answers
36 views

Can't execute remote command using PuTTY/ Plink over SSH

Currently I am trying to run bat files call_putty.bat and call_plink.bat, but it isn't excuting the input commands in -m E:\CREATE_ONT.txt When I remove -m E:\CREATE_ONT.txt, the SSH session is ...
1
vote
1answer
50 views

How do I select a random file in a folder?

I am trying to select a random file of a specific type like *.mp4 from a folder (and optionally subfolders) using the Windows command line batch script (no PowerShell) The file full path should be ...
0
votes
1answer
28 views

Add addtional test for files

What would I need to add, to also ignore file names containing AppData with .exe extensions? I am using this in an SetupComplete.cmd for unattended Windows setup, and have AppDataLocal.exe and ...
-1
votes
1answer
26 views

Batch file IF EXIST, all loops getting executed

I am executing a batch file which checks if Java\jre6 present then one type of command will be executed , then at last an else statement, but I find all stmts getting executed together. echo. echo. ...
0
votes
2answers
31 views

How to read each field of an line via batch file

I have a file which contents is as follows Testing:TEST1 --- Import --- Build Testing:TEST2 --- Import --- Build Testing:TEST3 --- Import --- Build Summary: Tests: 3 Failures:1 I needs to ...
1
vote
1answer
29 views

Creating Multiple Subfolders

I have a batch file to create multiple folders, but I need to create 4 subfolders in each of the folders created by the batch file. Can this be done in the same batch file?
1
vote
0answers
9 views

Batch file to change system date on start up?

Cmos battery dead with wrong time/date cant fix it at the moment In the time being I want a batch file to change the system date and time to current as a start up task But if the date/time is wrong ...
0
votes
1answer
28 views

How to set a folder name into a variable to use it in the same Batch file?

i want to make a batch file, This Batch file must look out, into a folder with the name "Draft" and for every sub-folder will be make a search for a .txt file "list.txt" and when finds this .txt file, ...
0
votes
2answers
33 views

How to insert a newline for every occurrence of the word abstract_ using BATCH

I have an xml I need to edit using batch. How do you insert a newline for every occurrence of the word abstract_ in the whole file? Here's a line in the xml (9999999x.xml) <related-object ...
-1
votes
3answers
25 views

Windows 8.1 Batch File Default App

I am making a batch file Contains this @ECHO OFF adb install %1 pause exit I want to make this batch File Default App for .apk files.Is Windows Send Parameters When You Open a file?If not Please ...
0
votes
1answer
71 views

InnoSetup : execute command/batch file after install process is complete

Friends, I'm writing a script which does a lot of stuff - install my application + other opensource software, set up s/w as service, execute batch files to do some stuff etc. 1) I set some ...
0
votes
0answers
10 views

Renaming numbered files with gaps into continuous numbering

I have a group of numbered pictures (for example: "img_938" through "img_1136"). The problem is that there are occasional missing numbers. (e.g "img_972", "img_973","img_975") where my camera ...
0
votes
1answer
15 views

Can a .bat file be used to edit group policy?

I'm setting up a wsus for a local college, and I'm looking into ways that are more effect for updating the Group policy on the computers so that they update via the wsus. Is there a way I can make a ...
0
votes
1answer
42 views

Is it possible to make a VBScript which executes a batch script within itself?

I know it sounds strange, but my idea is creating a single text file which contains a VBScript and a Batch Script within it, i.e. if I run that script as a VBScript, it calls itself as a Batch script, ...
1
vote
3answers
68 views

Get Random Folder name and write it as %FolderName% [closed]

I have: "C:\DIR\FOLDER-NAME_Random-String" and need a script that will check this random name of folder and write it as %FolderName%. I have many computers with C:\DIR\Folder-Name_Random-String ...
0
votes
1answer
38 views

How to organize files by extension using a batch file

I have many types of files spread around various directories on my laptop. I would like to move the files to appropriate directories based on their filename extensions. For example, all image files ...
0
votes
0answers
53 views

I can't get Windows 8.1 to execute batch files through the interface

(moved from stackoverflow where I mistakenly placed it in the wrong spot) Windows 8 has decided that a .bat file has no association. I can't choose to associate it with cmd.exe from the open file ...
0
votes
0answers
42 views

VBS unzipping - object required: 'objshell.NameSpace(…)'

I know very little about bash or vbs. I am trying to make a script that will automatically unzip a zip called 'dungeon.zip', which contains a little game I programmed. I want to unzip it to a folder ...
0
votes
1answer
17 views

Extracting Lines below Specified Words in batch script and change the format

I have a "test.txt" file in the format of: xdfdfdf ydffddf zddfdfd blah ... WordA 12 23 45 ... 32 12 65 xdfdfdf ydffddf zddfdfd blah ... WordA 54 76 67 ... 68 31 85 xdfdfdf ydffddf zddfdfd blah ... ...
1
vote
1answer
34 views

How to git clone with credentials using batch script?

I have a branch in git repository, I need to clone it from batch file ,can anyone please help?
1
vote
2answers
36 views

Dos script works fine on one machine and not on others, why?

Being not so good in dos-script but have good use for it, I did find here many easy solutions for issues I encounter. So recently I copied a script form here to count the number of files in ...
1
vote
2answers
57 views

Running a Python script from the “Run” prompt

I thought this would be easy, but I've been struggling for a while. I have a Python script on my Windows machine called "myscript.py". I have it in a folder that's on my PATH, and I've added the ...
0
votes
0answers
100 views

How to batch print SWF files to PDF?

I am using windows 7 X64. I have installed Adobe Acrobat, so that I have a virtual PDF printer. I have also install the adobe flash player on the system. I open the SWF file using the flash player, ...
0
votes
2answers
58 views

Any problems from copying system32 into syswow64?

I ran a .bat file as an administrator. The .bat file said to copy all .dll files from the current directory to the syswow64 directory. Something like: copy *.dll c:\windows\syswow64 Unfortunately, ...
0
votes
0answers
13 views

open excel using .bat when excel error “file in use” is returned

I have created a .bat file to open Excel, then my Excel workbook which contains a macro which runs on open, all on a scheduled task timer. The problem is that occasionally the Excel files are not ...
1
vote
2answers
31 views

check to see if service is fully stopped before trying to start service

I am trying to make sure the batch file knows the service "Tomcat7" is fully stopped before trying to start the "Tomcat7" service again. I know "NET STOP" and "NET START" are supposed to wait to ...
0
votes
0answers
88 views

Batch file or script to telnet to multiple hosts, log initial output then close and test next host

I have a large list of IP addresses from a database that I need to sanitize and determine which type of host (it'll be one of 2 device types) each IP address relates to. Is there a way of using a ...
0
votes
1answer
32 views

How to delete the profile AD attribute using dsmod or similar?

As part of a user management batch script, I need to delete the profile value from an AD User object. The syntax I'm using is as follows: dsquery user -name TEST | dsmod user -profile "" It ...
0
votes
2answers
38 views

Batch check for *.reg but only if = 1 file

I am looking to basically check if a batch file is present by wildcard *.reg, but I would like it to error if there is more than 1 .reg file. This is the code I have been trying to use, but my batch ...
-1
votes
1answer
75 views

Windows CLI alternative to robocopy and xcopy

I am looking for windows console-based tools similar to xcopy or robocopy. I have to send file into writable but not readable net share directory (unix privileges 333). Both tools are great however I ...
0
votes
1answer
34 views

How can I use a batch file to create multiple registry backups in the same folder? [closed]

I have a batch file in the Startup folder that creates a backup of the Windows registry using regedit. The problem is that it overwrites the older .REG file every time the computer restarts. Here's ...
-1
votes
1answer
31 views

Renaming files with batch [duplicate]

Is it possible to write a .bat-file that changes the names of all the files in a folder? For example: if I have a bunch of jpegs in a folder that have random names: File1.jpg ScreendumpA2.jpg ...