Text file containing a sequence of commands or program invocations.

learn more… | top users | synonyms (1)

0
votes
0answers
26 views

Win7 long filename passed into batch file only see short file name

I have a batch file that is called from the context menu , all it does is pass in the file name to the batch file. From the context menu [HKEY_CLASSES_ROOT\*\shell\Label Back Up File\command] ...
0
votes
1answer
179 views

Run a .bat file with CMDER

I have a .bat file that I want to run in Cmder not CMD echo off :begin echo Select a task: echo ============= echo 1) P1 echo 2) P2 echo - set /p op=Type option: if "%op%"=="1" goto op1 if ...
5
votes
6answers
1k views

Command to find network interface for IP

With ipconfig I can show the list of network adapters and their settings, e.g. the IP address. I'm looking for a reverse command that displays the name of the network adapter for a given IP address. ...
2
votes
1answer
54 views

Batch file to add Java Cryptography Extension files to updated Java

I'm trying to automate the following situation on a Windows 7 workstation. I use Java only for a single vendor app that requires the Java Cryptography Extension files to be placed in \security. ...
0
votes
1answer
25 views

ECHOing a variable that contains a string with spaces in a .bat file

I'm pretty much a beginner at .bat files, and I've stumbled across something that has stumped me. set /p msg=Enter message here: echo %msg%>>"D:\\File_location" And then a second file would ...
0
votes
0answers
19 views

Python scheduler using bat file

I have got a pyhton script for reading a csv file from a server, extracts one line and send an email with the extracted line. But I would like to run the scipt every 20 minutes which is the time step ...
2
votes
2answers
52 views

Executing a command line command from a simple batch file?

I am very new to this so a simplified explanation would be appreciated. I am trying to make a batch file that executes the following command in the command prompt: C:\Users\delta\dc2.exe ...
11
votes
5answers
2k views

How can I create a list of named folders in Windows automatically?

So, I am studying an online course which has hundreds of sub lectures. I need to download the source code for each lecture in a corresponding sub-folder. With over 120 lectures, creating a sub-folder ...
0
votes
0answers
13 views

Change default program for Edit context menu [duplicate]

Using Windows 8.1 here. Something that was simple in Windows XP is frustratingly complicated in Windows 8.1...arggh! I'm trying to change the default action when I select "Edit" from the context menu ...
2
votes
1answer
152 views

How to open multiple MP3 files with batch or vbs, just like Ctrl+A Enter

Just like the title suggests, I want to make a batch or vbs script file that will start playing music from my music folder. I can't make playlist because I'm updating this folder very often, and I ...
0
votes
0answers
17 views

Windows clipboard to command line

I'm trying to make a script that copies text with a simple macro and have a running .bat file extract the text from clipboard and set it as for instance var1. set /a var1=|clip| The above code was ...
0
votes
1answer
67 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
32 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
1answer
65 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
28 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
295 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
61 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
911 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
108 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
124 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
78 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
150 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
467 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] ...
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
159 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
63 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
52 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 ...
0
votes
1answer
64 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
18 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
73 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
158 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
160 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
180 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
197 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
46 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
181 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
89 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
46 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 ...
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
212 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
46 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
70 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 ...