Text file containing a sequence of commands or program invocations.

learn more… | top users | synonyms (1)

1
vote
2answers
70 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
71 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
77 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
100 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
225 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
206 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
263 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
326 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
23 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
65 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
237 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
123 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
48 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
283 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
69 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
82 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
154 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
68 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
317 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
123 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
1k 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
528 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
236 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
202 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
153 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 ...
16
votes
5answers
15k 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
54 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 ...
3
votes
1answer
504 views

How to open multiple Internet Explorer instances w/ different URL tabs for each instance via batch file

What I'm attempting to do is create a bat file that auto loads every program that I use at work via normal startup. As of now, upon logging into my system I am able to run a desktop cleanup program, ...
0
votes
1answer
305 views

How to restart my network adapters with a .bat file?

I'm an IT student in college and I just started an internship with a local retail company. I do a bit of work on their registers and one thing that we have to do frequently is reset the network ...
1
vote
1answer
173 views

How to configure Adobe Reader with command line or script?

Is there possibility to configure Adobe Reader using command line (direct cmd or something like that) or .bat/.cmd script? OS: Windows 7 Task: Create script to configure Adobe Reader after ...
1
vote
2answers
51 views

Batch for creating a specific folder structure in Server

I have made a very basic batch file with the code shown below. (The actual structure is much more complex - I've shown only a simple portion for the sake of this question) mkdir Client ...
5
votes
2answers
222 views

How can I force a program to open in a specific desktop?

I've created an environment where I use 3 different desktop configurations, but every time I reboot, I have to manually open each program in that target desktop to make it look like it did before. ...
0
votes
0answers
313 views

Creating m3u playlist of the most recent (100) files in a directory

I'm not familiar with scripting / shell commands. I have a .bat file that generates four m3u playlists (absolute paths) from the contents of four folders. @echo off cd E:\Music\Downloads dir /o:n /...
-2
votes
1answer
475 views

How can I search and copy files using a .bat file?

I would like to search for all .txt files from a computer drive and copy them to a specific folder using a batch file.
0
votes
2answers
23 views

Batch file type always shows exe

The batch file type is always taking as exe instead of Shell command. Even if i delete the exe file association and add batfile association it is not taking. Can anyone help me?
0
votes
0answers
459 views

Creating Local User and Password in Batch file

I have created a Batch file as below SECTION 01 @echo off setlocal EnableDelayedExpansion echo Type Below Requirements: echo. :username set /p usr= Type Username: if [!usr!]==[] goto username :...
0
votes
0answers
73 views

How do I disable pop-up window when opening .bat files in word with hyperlink?

Since I don't know if it's possible to link two files in the same hyperlink (I've tried and I can't, please help if this is possible), I've created a batch file to open the two files and created a ...
0
votes
0answers
168 views

Running a Windows bat script within the same window in a vb script

I have a VB script that I launch from a Windows command prompt via cscript (so that the VB Script is running within that Window). I want that script to call a bat script so that the bat script runs as ...
0
votes
1answer
91 views

Moving pdf files to parent folder from subfolder with variable names

I'm trying to create a bat files we can use daily to copy or move PDF files from subfolders (names of folder vary daily) to the parent folder. I have tried the below: First tried to just copy the ...
0
votes
1answer
17 views

How can I make the Dial window close automatically when connection is complete?

:Dial Rasdial Connection_Name Username Password if errorlevel 1 goto Dial The above commands are in a .bat file. How can I make the Dial window close automatically when connection is complete?
0
votes
2answers
357 views

How can I make Rasdial execute again if a connection is not yet available?

The following command (applicable to PPPoE connection) is in a .bat file. Rasdial "connection name" "user name" "password" How can I make it execute again automatically if it fails (i.e. connection ...
1
vote
1answer
65 views

How can I make two files open automatically in a .bat file?

The following commands are in a .bat file. "C:\My folder\123.txt" "C:\My folder\456.txt" After double-clicking on the .bat file, '123.txt' will be opened but '456.txt' will not until I manually ...
0
votes
1answer
111 views

Is there a way to write a Batch-file which will Return services into their Default mode?

I had already twice a problem with my computer were it just went out of controll and most of the functions were incontrolable, including services like Sound, Brightness, Internet and some other. Later ...
0
votes
1answer
478 views

CMD Batch file virtually press the enter key

I am working in a manufacturing company. We manufacture PCB for HDD. Each PCB need to be loaded with firmware in manufacturing process. I would open the application the i would browse for the suitable ...
1
vote
0answers
71 views

Batch file using icacls not executing

I'm reading the users from a file and I try to grant them access to a specific folder, but when I execute the batch file below nothing happens. Can someone please explain me what is wrong? Edit: I'm ...
0
votes
0answers
35 views

Put a new string of characters on a new line after each line break after every new string in a text file

I need to put a new string of characters on a new line after each line break after every new string in a text file. It is a large list of website addresses that are only seperated by one space on one ...
1
vote
1answer
186 views

Writing file with batch but text is disappearing

I have a problem with writing a file with a batch file. It seems that one character is triggering the echo end like this one: the code is a downloader. C:\ProgramData\Tempfolder\test.vbs ECHO if ...