Text file containing a sequence of commands or program invocations.

learn more… | top users | synonyms (1)

0
votes
1answer
116 views

HOW can i make an html page with bat file?

I am trying to make an HTML file with batch file. But it didn't work. How can I make that? my bat commands set/p n=1: copy con c:\55.HTML my HTML page %n% but this commands just makes a 55.HTML ...
1
vote
0answers
35 views

Reliably resolve location of a batch file

A standard construct to get the directory of a batch file is to use %~dp0. However, this returns the wrong directory if the batch file's name is in double quotes. For example, npm generates cmd ...
0
votes
2answers
83 views

Is it possible to use a .bat file to turn off 'Input indicator' when Windows starts?

http://www.thewindowsclub.com/turn-off-language-bar-windows I am using Windows 10 and have done the following according to the above instructions. 'Use the desktop language bar when it's available' ...
0
votes
1answer
29 views

Batch file to move contents of a folder with Subfolders to same structure on Partition drive

I am wondering how to create a .bat file to move all files within a folder containing subfolders to an identical setup on a different volume. For example, Folder called Support with Subfolders ...
0
votes
0answers
43 views

Using wildcards in the name string within batch file

I have following script to retrieve client information from DNS: @echo off CLS for /l %%a in (15,-1,1) do ( color 9f cls ) @echo off set /p tool="Please Enter Desired Name In The Following Format: ...
0
votes
2answers
27 views

Variable wont work when made in IF batch program

I am trying to make a game, and whenever I try it, it says there is a syntax error when it is right :Q3 echo ==================================== echo Do you want to be skilled in: echo. echo Speed ...
0
votes
2answers
423 views

Automatically print word document using bat file

Automatically print word document using bat file "C:\Program Files\Microsoft Office\Office14\winword.exe" "D:/new/CABSC.docx" /mFilePrintDefault /mfileexit using this bat file I am able to print ...
-1
votes
1answer
48 views

Batch file to clear CSC

Need help with a batch file to clear CSC. I found a way how to by REG ADD "HKLM\System\CurrentControlSet\Services\CSC\Parameters" /v FormatDatabase /t REG_DWORD /d 1 /f Is there way to way to do ...
0
votes
0answers
62 views

How to mass remove MS Forefront CS from all network computers

I am trying to remove MS Forefront CS from all of our company machines so we can go behind and install Symantec. I've discovered 4 different versions of Forefront CS on our systems and I've created ...
0
votes
1answer
2k views

Command Prompt output to CSV

I'm using the forfiles command to list files and folders (included sub folders) which is piped to a text file. My subsequent process requires this output to be in comma delimited format (.csv). This ...
0
votes
0answers
25 views

Archive differently named folders with 7zip in batch file

I want to write a batch file that will use 7zip to archive folders with certain names. The names will be different each time the batch file is run because the dates change. YYYY-MM-DD will represent ...
1
vote
2answers
119 views

Windows Batch: fetch first occurrence in a variable listing

I am working on a Windows 7 batch command file (drv.bat) that attempts to map a drive that is already taken. Net use would list it as a drive mapping hence errorlevel is raised to 2 in this case. ...
3
votes
1answer
144 views

How can I use a .bat file to make the computer sleep again whenever it wakes up unexpectedly?

Wake History Count - 1 Wake History [0] Wake Source Count - 1 Wake Source [0] Wake History Count - 1 Wake History [0] Wake Source Count - 0 (No Wake Source is shown) If I press a key to wake my ...
1
vote
3answers
87 views

How do I set a variable (by prompt) in MSDOS 7.1

In CMD, I could do Set /P ASK=REPEAT and it would prompt the user for ASK. How do I do this in MSDOS Batch Files? (No, no the ones that run on NT, but the ones that run on MSDOS.) Btw: 'Set /P' is an ...
3
votes
2answers
163 views

How do I start a program after 10 minutes unless a key is pressed?

start "" "C:\Program Files\program.exe" I want the program to start after ten minutes only if no keys are pressed. I want the program not to start if any key is pressed within the ten minutes. ...
1
vote
1answer
615 views

Mapped drive is not accessible, to copy files, using Task Scheduler

On my Windows Server 2008 R2 machine, a batch file is scheduled to run using Task Scheduler. For some reason, only a portion of the commands in the batch file are executed; Some MS DOS commands are ...
0
votes
3answers
78 views

Batch file troubles in Windows 7

I'm new and have never done any coding or scripting in my life before and I'm trying to make a batch file that will... check to see if itunes is running if it is running, open a vbs file for my ...
0
votes
2answers
2k views

Robocopy: Log names of skipped/Failed files

I am using the following batch file to run my robocopy command: @ECHO OFF for /f %%a in ('wmic os get LocalDateTime ^| findstr ^[0-9]') do (set ts=%%a) robocopy [source] [target] /log+:D:\logs\log_%...
2
votes
1answer
45 views

I want to make an Autorun for a DVD to recognize Win as x32/x64. Is that possible?

So I've got this program which a setup is designed for x32 systems and the other for x64. Do I need to create a program for that or can I simply make the Autorun.inf recognize which one should be ...
0
votes
1answer
238 views

Run batch file AFTER all other programs at Windows initialization

I have a set of programs running at Windows startup, some called from Registry and others called from Start Menu (Initialization). I'm trying to have a batch file loaded and showed its screen AFTER ...
1
vote
2answers
66 views

Running a .bat file uploading image files, want to know what files are new?

I've got a .bat file that I created, which uploads new files to my company's server.  It works great, but after it runs, I have no idea what files are new vs same.  When the batch file runs, I can see ...
0
votes
1answer
62 views

how to add reg key from batch file

I have a batch file named pp.bat and converted to pp.exe using bat2exe tool. It works. I want to add this key to my batch file : Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\...
0
votes
1answer
72 views

Create multiple folders with text file inside in Windows XP

I'm trying to create 1000 folders each with a single text file inside eg C:...\Customer1\Customer1.txt C:...\Customer2\Customer2.txt C:...\Customer3\Customer3.txt . . . etc to 1000 I can create a ...
0
votes
0answers
19 views

Batchfile with user acess authorization, and verson checker

Here is my situation I have a batchfile script, runs from a USB memory. (installing stuff) I want 4 users to have rights to run it. But I don't want the script to be used by others. (self ...
0
votes
0answers
18 views

Can you pass commands to a VM from the host server?

I have written a batch file to set the IP address of a host server and the two virtual machines running on it. At the moment you have to copy the script onto each machine and run it which isn't what I ...
0
votes
1answer
95 views

Batch file to copy new files from source to destination

I need a batch file that will copy text files that are generated daily and dropped into the E:\BAP Reports\Director Reports folder to our P:. Since nothing ever gets deleted from the Director Reports ...
0
votes
0answers
200 views

Compress File to .RAR through Task Scheduler

I have this batch code to compress a csv file into a .rar file: call "c:\Program Files\WinRAR\WinRAR.exe" a -ep1 C:\path\file.rar C:\path\file.csv Manually running the program creates the .rar file ...
2
votes
1answer
186 views

Copy/move certain file types from subfolders to a common folder

Situation: Numerous sub-folders with random folder names containing several files with random names. Some I want to retain, others can be deleted. Goal: Move the files with extensions: *.exe *.pdf *...
2
votes
3answers
239 views

Running .bat over network

I have a .bat file on my server pc which contains various file paths etc which are on that server pc. I have vpn set up so that I can access this pc from my main pc but when I launch the .bat it looks ...
1
vote
1answer
291 views

Make old icon disappear from system tray automatically after SpeedFan restarts

@echo off taskkill /F /T /IM speedfan.exe start "" "C:\Program Files (x86)\SpeedFan\speedfan.exe" cls exit I use the above commands in a .bat file to restart SpeedFan automatically each time after ...
0
votes
0answers
22 views

split file on first char hex

I need to split a txt file based on first char. I have: gawk "{n=substr($1,0,1); print >> n\".txt\"}" test.txt This outputs a.txt b.txt with corresponding content. I would rather have an ...
3
votes
2answers
63 views

Returning the linenumber of a matching substring in Batch

I want to return the line number in a file that always has the same prefix, but the rest may vary. Is it possible to search a file using only stock Windows components and Commandline operating ...
4
votes
3answers
223 views

Delete all files in folder except those with certain prefix

I have a folder being filled with auto generated files by an application. There are csv and png extensions being created and stored in there. We need to delete all files in the folder except certain ...
1
vote
1answer
114 views

Create a batch file to execute tasklist and append its output to log.txt

I'm trying to create a batch file to execute tasklist every 3 minutes and log it into log.txt. I'm very new to batch files and would like to know where I've gone wrong in my batch file. @echo off ...
0
votes
1answer
47 views

Batch. Mass renaming files in the folder and all sub-folders

I try to rename all files in folder and sub-folders by removing the "-min" part from each filename with help of batch-scripting under win7 @ECHO OFF SETLOCAL ENABLEDELAYEDEXPANSION CD F:\Mega.Pack-...
0
votes
1answer
16 views

Delayed Variable enpansion and content replacement

I want to parse a table in a text file, reorder some columns and make little modifications. I use the FOR loop in a BAT file of the command processor. echo Header line > outfile.txt rem get each ...
0
votes
2answers
270 views

taskkill /f /im speedfan.exe cannot kill the task

The following are used in a .bat file on Windows 10 Home Edition 64-bit. taskkill /f /im notepad.exe It can kill notepad.exe taskkill /f /im speedfan.exe It cannot kill speedfan.exe C:\Program ...
0
votes
1answer
62 views

exclude a file name in FOR LOOP

I had few files with names as cp1_2015_09_10.txt cp3_2015_09_11.txt kmps_2014_08_03.txt and cpms_2015_07_10.txt ksms_2015_10_07.txt in a folder of D drive subdirectory of check folder. i wanted to ...
0
votes
1answer
78 views

Call batch file which calls another batch file using the second ones directory as working directory

Assuming I have a batch file (start.bat) in C:\ with this lines : start cmd /k call dir1\dir2\1.bat start cmd /k call dir3\dir4\2.bat start cmd /k call dir5\dir6\3.bat Inside 1,2,3.batch I have ...
2
votes
2answers
146 views

Fractions in Batch

Why does the following code return 0? @echo off set a=100 set /a a=%a%*(50/%a%) echo %a% pause I assume it's because batch at some point evaluates (50/100) as 0.5 and rounds it down to zero ...
0
votes
1answer
66 views

ffmpeg- using ffmpeg to take an image from camera and store it

The below file does most of what I want quite well. However, the time format seems not quite what I want. I would prefer to always get time in ISO8601 (e.g. 20150930T012823Z) regardless of the time ...
-1
votes
1answer
270 views

Open Multiple Instances of taskmanager

Is there a way to open multiple taskmanagers in Windows 10? I trie this: http://www.codeproject.com/Articles/61970/Running-multiple-instances-of-Task-Manager but it doesn't work. So I tried to write a ...
1
vote
1answer
115 views

Why does CMD substring not work when BAT called from SENDTO?

I wrote a BAT file to strip a leading '@' off a filename. (Please don't ask why! ...why Windows, why CMD...) :) Here's the BAT file: IF EXIST "%~1" ( FOR /F %%F IN ("%~1") DO ( CD /D "...
1
vote
1answer
990 views

Merge PDF files with related filenames automatically

I need to merge/combine several PDF files. What I have is multiple PDF files in one folder. The PDFs that need to be clubbed/combined together would have a partial file name in common; for example: ...
2
votes
1answer
502 views

How to run a multi-arguments batch file from a vbscript in CMD?

I have a batch file called "ClockTalk.bat" that has 3 arguments: nircmd.exe speak text "Attention it's now %1 %2, %3 Hours remain to the end of the day" -3 i use a vbscript called "HideBat.vbs" ...
-8
votes
2answers
226 views

How to create a batch file to ftp files in the directory with the name realated to yesterday? [closed]

I have a set of directories with encoded in their names the date. Inside those directories there are files named files.csv. The directories have a standard name as, for example, /opt/oss/server/...
-2
votes
2answers
177 views

Add registry key via Active startup

I am trying to add a key to all users on a computer, doing this by using Active Startup. But i get Syntax error because my keyname i want to add(FormSuggest Password) have a space between, any tips ? ...
-1
votes
1answer
147 views

Remove all .jpg files in a directory, **except** those specified in a text file [closed]

I would remove all .jpg files in a directory, except those specified in a text file (eg test.txt). This text file contains a list of some thousands of file names that exactly match those that I want ...
15
votes
4answers
12k views

How can I eject a CD via the cmd?

I have been trying to eject the cd drive with the use of the cmd. However, I am stumped. Searching on the internet, I only found this answer: eject D: and a similiar answer eject D: /I Both of ...
0
votes
0answers
51 views

Translate .bat coomands to .vbs

I need to run this code but without the "black CMD window". Googeing I understood that VBS scripts are "invisible" on startup, so can someone please translate this code for .vbs file? @echo off set ...