Over 1 million tech questions and answers.

Creating A Batch file to run Selenium RC

Q: Creating A Batch file to run Selenium RC

I am running Windows 7 home premium

I have tried to create a batch file that should run Selenium RC but the path is coming up incorrect.
The batch file is coded like this :And saved as a bat.

@echo off
START "c:\selenium\selenium-remote-control-1.0.3\selenium-server-1.0.3\java -jar selenium-server.jar"

The cmd opens up but I get this in the cmd windows

Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.


Preferred Solution: Creating A Batch file to run Selenium RC

I recommend downloading and running Reimage. It's a computer repair tool that has been proven to identify and fix many Windows problems with a high level of success.

I've used it in the past to identify and fix everything from blue screens (BSOD's), ActiveX errors, corrupt files and processes, dll/exe/sys errors, recover lost memory, Windows update problems, defragging, malware removal etc.

You can download it direct from this link http://downloadreimage.com/download.php. (This link will automatically start a download of Reimage that you can save to your computer.)

A: Creating A Batch file to run Selenium RC

please do not duplicate posts
I have moved the reply from this post to your other post here
closing this one

Read other 1 answers

I am totally new to Batch Files. Here is my problem:

I need to create a Batch file that will:
Go to a specific folder on a network drive
Copy a File
Go to another folder on a network drive
replace a file
and then close.

Any help out there as to how to do this?

A:Creating Batch File

Read other 7 answers

how do l create batch file to map an existing file and printter server to the new file and printer server.

A:Creating Batch file

Do you mean remap a network drive? If so, you would create a .txt file that looks similar to:

net use h: /d
net use h: \\servername\sharename

Then rename the file to .bat and run it.
The first command deletes the mapped drive h: and the second one maps it.

Read other 3 answers


I have created a java application. and I want to give it to my friend who does not have java installed on his machine.So I want to give him java setup and only a jar file of my application.
For that I created batch file as follows:

set path=d:\Test 3\jdk1.6.0_14\bin;%PATH%

SET CLASSPATH=.;d:\jdk1.6.0_14\jre\lib\rt.jar

java -jar "Test3.jar"

Now if my friend puts this Test 3 folder on D drive,then only the application executes.This is obvious I knw.
But there is possibility that someone may or may not have D drive. In this case, what I want to do is, when he copies the folder and paste it anywhere,and just double clicks on the batch file the application should execute.
So is there any method in batch file to get the path of the folder where he has pasted that folder?

Please help me...

Read other answers

edit read below

A:Creating a Batch File

I need to write a batch file on a ftp server to do the following:

I have a locally directory on an ftp site, c:/pdf

I want to have this run once to see if new files have been written to it, if they have, move them into say c:/pdf/sent

Then I want to create an error log if any issues arise

Anyone have any experience with this ?

Read other 1 answers

I need help creating batch file that will do the following...
I want it to echo "Welcome (insert name here)."
I want it to say "How are you today, good or bad?" [G, B]
If G, I want it to display, "That's great to know, sir! Would you like me to open your homepage? [Y, N]
If Y, I want it to execute cd C:\Program Files\Internet Explorer\iexplore.exe
If N, I want it to EXIT
If B, I want it to display "I'm terribly sorry to hear that. Would you like me to open Internet for You?"
If Y, execute cd C:\Program Files\Internet Explorer\iexplore.exe
If N, I want it to pause

Any help would be great, because everytime I put in the commands, they don't work (I'm sure I'm not putting them in correctly). I do not understand much of the way Microsoft CMD help explains it, so please put it in examples and plain English! Thanks!

A:Creating a welcoming batch file...

Try this;

Visual Command Line - Create Bat Files

This gives you a visual interface where you can just click on the commands you want to use, and add any text etc. This then automatically generates the batch file you want;

Regards....Mike Connor

Read other 9 answers

Hi Everyone,

I'm new to batch files but I want to create a batch file to run at startup on Windows 7 so when a user logs in with there username and password into the network to see if the Xerox 7535 network printer is installed and if it isn't to install it.

Now because these are computers that multiple users use frequently if I were to do this manually I would need the user to login to the network with there credentials and then open a window and type in //printer_server_name/ and a window would pop up and again they would have to type in there network credentials (username & password) then select the printer Xerox 7535 printer and right click on it and select connect and it would install the printer drivers if needed.

Now when I login as administrator to the computer I can connect to the printer server but when I try to connect/install to the Xerox 7535 printer it doesn't install and I get Error:"0x0000052e so instead I have to have each user login into the computer and install the printer which works that way.

I'm open to any other ways of doing this and I really appreciate the help.



A:Creating a batch file to check and see if a

closing duplicate, original is at http://forums.techguy.org/windows-7/1145562-how-create-batch-file-install.html.

Read other 1 answers

I am looking to create a batch file. I have little to no experience writing batch files, which is why I am here. We are having issues with one of our software titles and they fix they gave to us is to replace a specified file with a new file to fix the issue. We have 200 plus computers with this software on it, which will take a long time to do manually going to each computer. We have software to actually push batch files out and such but I need to create it first.

What I need the batch file to do is go out to a specified directory, rename the current file, and then add a new file to that directory. I want to rename the current file in case we have to revert back to it down the road. The file we are adding will be the same file name, which is why the original needs to be renamed. If anyone could help me with this, I would really appreciate it. In the meantime, I will be trying to learn myself. This will also need to be a silent operation without any user interaction.


A:Solved: Creating a Batch file

Read other 7 answers


I have 2 files that are in the same directory which I want to start one after the other.

I have created a simple batch file like this which opens 2 files at the same time.


Start Server.exe
Start Game.exe

Is it possible to leave say a 10 second gap between opening the Server.exe and Game.exe? Also is it possible to quit Server.exe when I exit Game.exe?

It probably isn't possible but I am pretty useless at scripts and need some help.

Any help would be appreciated.

A:Help Needed Creating Batch File

Here you go. Just put the location where the first.exe and second.exe are.
The 10000 = 10 seconds.

start "HandBrake" "G:\Program Files\HandBrake\Handbrake.exe"
start first.exe
echo wscript.sleep 10000 > temp.vbs
start /wait temp.vbs
start second.exe
del temp.vbs

Read other 2 answers

Ok hello I was wondering if anyone could write me a quick batch file and state the code below plz, could u make it change the windows theme to classic, and make and create a shortcut, which would then automatticly move itself to the desktop!! Thank you!! I kno a bit of code!!! Lol as a quick question lol i have been learing how to create batch files etc etc but i want to know what code i am learning lol!! I Dont know

A:Creating a batch file for my needs using notepad!!

Im a newbie

Read other 1 answers

I am trying to write a batch file that will create subfolders based on the name of the parent folder. So if the folder that I am working in is named "dg2001-10-19" then I want the batch file to create 3 subfolders named "dg2001-10-19 - WTA", "dg2001-10-19 - BHMM" and "dg2001-10-19 - files". In the other folders that I am working in I want it to work the same way - for a folder named "disc" it would create "disc - WTA", "disc - BHMM" and "disc - files" and place them in the disc folder.

If anyone can help me I would really appreciate it. I realize that this is probably a simple thing but I am not very familiar with programming or batch files. Thank you very much for your help.

A:Help with Batch File for creating subfolders

Read other 8 answers


I'm totally new to creating batch files. I have a Winxp professional box and I need to backup a folder on the C: drive and some sub folders within that folder to a network drive. I'm totally lost. I just need some help please.

A:help with creating xp batch file for backup

Read other 13 answers

Hi guys.

I'm not sure if this is the appropriate place so appologies in advance if not.

I have been tasked with creating a batch file to copy data from a laptop to a server via a parallel p2p connection, and quite frankly I haven't a clue where to start.

Background: I work for a healthcare organisation a division of which is tasked with monitoring the hearing of all newborn babies in the country. The "screeners" (the people that actually do the screening) have laptops which are connected to the equipment. The software that checks the hearing generates a text file of the data gathered and saves it to the hard disk of the laptop. This data is very important and must be saved/backed up.

We cannot use flash media such as usb pen's or psmcia cards because it is simply astonishing the ability these women have to destroy equipment (I've seen a PCMCIA Card literally rammed into a floppy drive thus destroying the card and the floppy drive! )

Therefore the solution that we came up with is to use a parallel cable because it's harder for them to destroy.

We have worked out how to create the connections etc however the people doing the monitoring are not the most IT literate people so doing the job manually is not an option. Likewise it's not an option for us (IT) to do it because the screeners are scattered all over the country, sometimes hundreds of miles apart.

So basically I need to know what the name of the program that instigates new... Read more

A:Please Help Creating Batch File for p2p Connection

Read other 10 answers

I want to create what I suppose would be a batch file. What I want to be able to do is, with one double click on an icon:
1. Open a program
2. Go to File--> Community Start
3. Click a button
4. Enter text into a text box that pops up
5. Hit ok
6. Select a check box
7. Hit ok

Is this even possible? If so, how can it be done?

Read other answers


I want to write a small batch file to open certain documents on my computer when I log on, that quite easy a certain document only needs to be open on fridays so I need to find a way of checking the system date and then using something like. I asked elsewhere but didnt get much help, a guy said something about using a VBscript although I have no experience in VB, and little in batch file scripting.

if date ==friday
then open myfile.doc

Can anyone give me some help with this?

I am using XP BTW.



EDIT: I plan to put the .BAT file in my start folder and hope to run a check daily to see if day == friday.

A:creating a batch file to run commands on a certain day

Why not just use a batch file and use "scheduled tasks" in your control panel?

Read other 3 answers

Hey there !!

I was trying to create a batch file (.bat) on the pc so that every time on starting (or restarting) the computer, the file should run and all my cookies and temporary internet files from IE, infact all the files from the Cache alongwith the History gets deleted automatically.............

Can someone please help me with the code for such a file ???

Thanks in advance..................


Read other answers

Hello, first post here! Love the site.

I've discovered my son has been tinkering with the likes of Myspace and Facebook and came along one of the sites that trick people into creating batch files. I don't know the exact nature of it, but I'd like to make sure our computer is clean.

If it'll help, I can give you a HJT log to start:

Logfile of HijackThis v1.99.1
Scan saved at 4:34:15 AM, on 10/23/2008
Platform: Windows XP SP2 (WinNT 5.01.2600)
MSIE: Internet Explorer v7.00 (7.00.5730.0011)

Running processes:
C:\Program Files\PC Tools Firewall Plus\FWService.exe
C:\Program Files\Alwil Software\Avast4\aswUpdSv.exe
C:\Program Files\Alwil Software\Avast4\ashServ.exe
C:\Program Files\ewido anti-spyware 4.0\guard.exe
C:\Program Files\Dell\QuickSet\NICCONFIGSVC.exe
C:\Program Files\Webroot\Spy Sweeper\WRSSSDK.exe
C:\Program Files\Alwil Software\Avast4\ashMaiSv.exe
C:\Program Files\Alwil Software\Avast4\ashWebSv.exe
C:\Program Files\... Read more

A:Solved: Son tricked into creating batch file

Read other 16 answers

edit: headline meant to say 'authenticate'.

I am having a problem whereby users cannot view a document browsed to from IE unless authentication is provided and IE does not prompt for user details (it is a web based program that links documents from other locations). The only way that I can get it to work is to manually browse to the server, enter in the credentials, and only then does IE allow them to open the file with no problems. This works until the local PC or server gets rebooted.

Is there a way to create the authentication to run on startup, say in batch file? Or is there another way to do this?

Thanks in advance.

Read other answers


I am a network/system administrator and I am having to add a user group to the administrators group on about 60 different machines. I was wondering if anyone knows how to program a batch file that I can disseminate down to all my computers that could add a user group to the administrator group. Any help would be great.



A:Adding a administrator by creating a batch file.

I'm assuming this is a domain

You can 1) Use startup script (defined trough GPO) on your computers, that has the command - NET localgroup Administrators /add "domain\yourgroup"

Or you can do some VB code -
strComputer = InputBox("Type in the Computer Name","Computer Name Variable")
strUID = InputBox("Enter Domain User Name", "Domain User Name Variable")
Set objGroup = GetObject("WinNT://" & strComputer & "/Administrators")
Set objUser = GetObject("WinNT://Domain/" & strUID & "")
Change Domain to your Domain.
Take out the strUID's input box and put in the name of the group you want to add.

You can do the input box on strComputer to do it one at a time or do some kind of list and have the vb code parse the list.

Also you can stick either in some kind of GPO or something

Hopefully if your a network admin your users don't have admin rights so you really don't want to run this on a batch file basis.

Read other 2 answers

Can anyone tell me how to create a batch file for shutting my computer down instantly or say maybe in 1 hour using notepad.

Just thought i would be a geek for the day and try new stuff out!!!!

Thanks in advance guys

A:creating a batch file to shutdown computer

roylee77 said:

Can anyone tell me how to create a batch file for shutting my computer down instantly or say maybe in 1 hour using notepad.
Just thought i would be a geek for the day and try new stuff out!!!!
Thanks in advance guys
LeeClick to expand...

Hi Lee,

What I did was to lookup the shutdown command using the Help & Support window from Start button. Then I made a clone of the shutdown icon and substituted the shutdown command with parameters to shutdown the computer by just clicking on the cloned shutdown icon from my Desktop.

You can use the parameters of the shutdown command to indicate 1 hour from Now to perform the shutdown (in seconds, I think), so, that would make it 3600. I think the parameter is -T or -t (I forget) - I'm using Linux now - too frustrated with paying all of the security license fees for av, spyware, etc. for Windows.

-- Tom

Read other 1 answers


I have created a simple batch file to backup my folder.

Here is how it looks like:

md e:\test
copy C:\My Documents\*.* e:\test

It works fine but I want to be more advance like adding date to the backup drive and compress the files.

Tried the date thing but didn't work :

md e:\test %yyyy%-%mmm%-%dd%
copy C:\My Documents\*.* e:\test %yyyy%-%mmm%-%dd%

Anyone ?

A:Please teach me some steps on creating this batch file.

Hmmm... I would go a bit further.

This can be done with two free tools. Autoit and MS Cabarc.

You can use Autoit to create variables for the date, and us Cabarc to create a compressed file with the date as part or all of the name. Not that hard.

If you are interested, go to http://www.hiddensoft.com to get Autoit and go to http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncabsdk/html/cabdl.asp to get Cabarc.

Let me know and I will help you with the code.

Read other 2 answers

I am currently running the following to supposedely create a directory IE V:\Backup Folder\Pictures\Backup 21-05-2012
robocopy /e "c:\users\jon\pictures" "v:\Backup Folder\Pictures\Backup %date:~-10,2%-%date:~-7,2%-%date:~-4,4%"

Evrything works fine except the backed up pictures folder is just named as V:\Backup Folder\Pictures\My Pictures

If for arguments sake I backup my outlook file using the above parameters I get what I want EG
V:\Backup Folder\Outlook\Backup 21-05-2012

It's as though there is something within the pictures folder? that is preventing the corrctly named folder from beign created?
The same happens when I try and backup Desktop and Documents folders
What am I missing?

A:Creating Batch File with Robo Copy

Quote: Originally Posted by Big Tung

Evrything works fine except the backed up pictures folder is just named as V:\Backup Folder\Pictures\My Pictures


I can't quite understand where the \My Pictures is coming from. Do you mind posting a screen capture image of the folder arrangement, so I can see what it looks like?


Read other 3 answers

I have been trying to delete these reg entries by creating a batch file. I first tried it as a reg file by just putting a dash in front of the lines as suggestion on line. It didn't work. Then I tried to create a batch file, the following are the keys I want to delete:
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FolderDescriptions\\{211 2AB0A-C86A-4ffe-A368-0DE96E47012E}]

[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FolderDescriptions\\{211 2AB0A-C86A-4ffe-A368-0DE96E47012E}\\PropertyBag]
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FolderDescriptions\\{491 E922F-5643-4af4-A7EB-4E7A138D8174}]
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FolderDescriptions\\{491 E922F-5643-4af4-A7EB-4E7A138D8174}\\PropertyBag]

[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FolderDescriptions\\{7b0 db17d-9cd2-4a93-9733-46cc89022e7c}]
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FolderDescriptions\\{7b0 db17d-9cd2-4a93-9733-46cc89022e7c}\\PropertyBag]

[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FolderDescriptions\\{A30 2545D-DEFF-464b-ABE8-61C8648D939B}]
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FolderDescriptions\\{A30 2545D-DEFF-464b-ABE8-61C8648D939B}\\PropertyBag]

[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows... Read more

A:Creating a batch file to delete reg entries

When you say batch file what do you mean a batch file is .bat which runs command.com you need a .cmd file as that runs cmd.exe. you code should work but to test do one line make sure that works use /f not force. How do you run the file if it runs as system the key may not be there

Read other 3 answers

I'm trying to write a simple batch file that would mute or turn down the volume at startup. The idea is to stop the obnoxious MS startup tune when booting up in a place where I don't want attention; i.e. on a plane, in a meeting, classroom, etc. As a techie I'm way too lazy and forgetful to mute the sound before logging off everytime and would much rather write a complicated script to do this.

ps. why don't laptop makers install the old toggle volume switches?? click=on, off.. it would be such a simple solution to this..


A:Solved: Need help with creating a batch file to adjust volume

Read other 8 answers

I have a PPPoE internet connetion from my ISP. Every time I want to access the internet connection I have to goto the setting and in that I have to open it and then have to dial it.
This is the traditional way to log in but I wanted to make a batch file in which the PPPoE user name and password is saved and after executing the batch file the PPPoE connection will be established.
Please help me with the proper batch code . . .

A:Creating the PPPOE internet connection using batch file

how is your computer connected to your modem is it via Ethernet cable, USB or wireless? and how are you connected to the internet. You normally would log into your modem/router and put your user name and password in there with whatever other parameters your ISP gave you and then restart the modem and your computer and it should just work. Did you install any software when connecting the modem as unless you're using a 3G or a 4G type mobile wireless internet device Windows takes care of this things efficiently and without much fanfare or offering to sell you whatever other 3rd party software so often does

Read other 2 answers

Right I'm still new to coding and this is going to get a little bit complicated so any help will be appreciated.

I need to copy all .jpg files for "dir a" into "drive b"

If there is no .jpg in "dir a" I need it to throw up an error possibly a .vbs script which I have already made.

Any help will be a big help.


A:Solved: Help with creating a batch file for copying files

Read other 16 answers


I am trying to open a program (Caseware), export from it for a specific file, and then repeat the process across a series of these files. once in a useable format I need to report across the exports.

I think from reading posts I can use a batch file to open a specific file using a specific software package, Is there a way then to use specific keystrokes inside the package to do the export, then close the file and repeat on the next file.

I may need to put a pause in to the batch file, as the sowftare can take up to two minutes to load a file.

Any help or advice would be much appreciated as otherwise I'll be stuck doing it manually for ever :-(



Read other answers

Hi. I need help creating a .bat file that compares 2 same file on 2 different computers (server and client) on a LAN network..
It compares the same file on a server cpu, and there are 4 possible conditions i think:
- Same date on server > then do no action
- Older date on server> no action
- Newer date on server> action, sync using goodsync command line (i'll work on this)
- Connection with the server down > no action
So it's like this :
abc.txt on client 11/01/12
abc.txt on server 12/01/12

then sync

My question is, how exactly do i compare file on a LAN network?

A:Need help creating a batch file based on last modified date..

Welcome to TSG denywinarto. Hope you find some help here and take the opportunity to help others!

I quit doing Batch files a while back an went to vbs because it seems more robust. That said there is a vbs script in this thread (post #3) that you point at a directory and it makes a text file of file information including modified date and the full path to the file.

If you run this against your two folders (producing the two text file) then write a process that compares the two files and moves data according to your desires. You can do the file move and compare in vbs and not have to worry about the goodysnc piece.

Read other 1 answers

I would like to create a batch file with the next parameters:
1. A user is been asked to create his username.
2. If the user tries to enter less then 5 characters or more then 15 characters it must come to :A again.
3. If the user tries to use words: (user, girl, boy) it must come to :B

But I solved the issue not completely.
1. If the user tries to press ENTER, it comes to :A
2. If the user's name starts as (user, girl, boy) it comes to :B
But if user's name starts from _user, badboy, nicegirl it doesn't work

So I want to exclude usernames which contain next words (user, girl, boy) in any places of the username. Aslo if a user tries to use SPACES instead of username OR spaces in username (my name) it must come to :A
I know that operator IF is not allowed to use masks. What is the solution?
Thank you.
@echo off
echo Enter your username.(5-15 characters, no spaces)

set /p n=Username:

IF "%n%" == "" goto :A
SET _prefix=%n:~0,4%
IF /i %_prefix% == user goto :B
IF /i %_prefix% == girl goto :B

SET _prefix=%n:~0,3%
IF /i %_prefix% == boy goto :B

attrib -h -r userlist.txt
echo [Settings] > userlist.txt
echo username=%n% >> userlist.txt
attrib +h +r userlist.txt

attrib -h -r userlist.txt
echo [Settings] > userlist.txt
echo username=Default_name >> userlist.txt
attrib +h +r userli... Read more

A:Batch file. Creating username with exclusionary conditions

Read other 16 answers

I'm trying to write a batch file that will scan/search a directory for MS Cabinet files. Then extract the contents of each cabinet file. The extracted contents are then "stored" in a cabinet file with the same file name as the original file. The new file then overwrites the old file.

Presently, the setup is -

search for cabinet files;
extract cabinet content to temporary directory;
"store" the extracted content as a cabinet file, and the cabinet file named the same as the original cabinet file;
copy the new cabinet file to original file location and overwrite the old file;
delete contents of temporary directory for receiving extracted contents of any other cabinet files;
repeat process until all cabinet files changed.

I've written a batch file as below, but on running it, it only processes some cabinet files, and get a message that file not found for other non-processed cabinet files?

The directory being tested on has approximately 150 cabinet files, but only 20 or so cabinet files are processed by the batch file!?

What is wrong with the batch file?

FOR %%A IN (*.cab) DO (cabarc x d:\sw_2014_rev\plastics\%%A C:\SW_TEMP\ | cabarc /m none n c:\sw_temp\%%A C:\SW_TEMP\*.* | XCOPY C:\SW_TEMP\%%A /v /y | DEL C:\SW_TEMP\*.* /q)

A:Creating Batch File to Recompress MS Cabinet Files

Hi Meeshu,

I don't quite understand your description of the problem, however, I can sort of read your batch snippet; note that the Cabarc command is depreciated, though, and I don't know it's syntax. Please use the Makecab command.

I've notice a few mistakes with your batch snippet too: your paths aren't double quoted, files with spaces in them will break the command line; also you seem to have misused the pipe symbol; an ampersand is instead used to run multiple commands on a line.


for %%A in (*.cab) do (
cabarc x "d:\sw_2014_rev\plastics\%%~A" "C:\SW_TEMP\"
cabarc /m none n "c:\sw_temp\%%~A" "C:\SW_TEMP\*.*"
xcopy "C:\SW_TEMP\%%~A" /v /y
del "C:\SW_TEMP\*.*" /q

Read other 5 answers

I loaded and coded Irfanview with a view to changing the resolution of 195 jpg images, all contained within one folder and numbered sequentially.

I began the process and everything worked fine until the program stopped at image # 171.

I tried three times, with the same result. Would anyone have any idea of why the program is doing this?


A:Solved: Problem creating a batch file with Irfanview

I've never had an Irfanview Batch not work ???
Remove #171 from the batch list and see if that works.

Read other 2 answers

I have created the following batch file to automatically load and login to a site, I created it and tested it on a computer running xp, but I can't get it to work on a windows 7 machine...

TITLE Water Monitor Auto Start Up
mode con: cols=42 lines=1

REM Create a time delay Visual Basic file of 1 second
cd c:\
IF NOT EXIST ECHO Wscript.Sleep 1000 >> 1second.vbs


REM Using a for loop to count for 20 seconds to allow startup script to finish
for %%d in (20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0) do TITLE Water Monitor Auto Start Up in %%d Secs

&& ECHO. && 1second.vbs && cls



any help would be appreciated.

A:Help creating a batch file to auto login to a website

Where is it failing? What is TITLE after the do supposed to accomplish?

Read other 3 answers

I have the following batch script

@echo off

setlocal enableextensions

set "baseName=dnshistory"

set "count=0"
for /f "delims=%baseName%." %%a in (
'dir /b /o-d "%baseName%*.txt" 2^>nul'
) do ( set /a "count=%%a+1" & goto saveData )

ipconfig /displaydns | find "Record Name" > "%baseName%%count%.txt"
The problem is that when i run it on my windows 7 desktop, it creates an empty txt file in comparison to my windows 8 laptop, where it creates the dns record that i need.

Does anyone knows why this happens on windows 7 ?

A:Windows 7 creating blank txt file after running a batch script

Usually inserting a bunch of "echo" statements will give a hint what's wrong. Just like using MsgBox in other programming languages.

Read other 3 answers

hi all,

I am working as a system administrator around with 90 systems and using server 2003.all systems are windows xp

I want to shutdown all 90 systems at once.it can be possible with batch file using "SHUTDOWn" command
I worte the batch file using that command but it is not working

My Batch file like this

Shutdown -s -m \\Test1 -t 60 -c "Your systems will be shutdown within 1 minite. please save your work"
Shutdown -s -m \\Test2 -t 60 -c "Your systems will be shutdown within 1 minite. please save your work"
Shutdown -s -m \\Test3 -t 60 -c "Your systems will be shutdown within 1 minite. please save your work"
Shutdown -s -m \\Test4 -t 60 -c "Your systems will be shutdown within 1 minite. please save your work"

this is my batch file.this is not working...please help me..

Note: When i exceute the same command form command prompt it will work fine...for that i have to type that same command for 90 times to shutdown all compters.

i am using another batch file..it shows like this...

@Echo off
Echo bunny=Program
REM ****************************
REM * Program Variables *
REM ****************************

set varcomputer=Test1
goto loop

set varcomputer=Test2
goto loop

REM ****************************
REM * Program *
REM ****************************

echo Shutting down %varcomputer%.
shutdown -s -m \\%varcomputer% -t 600 -c “The computer is shutting down. Please save your work.”
goto %varcomp... Read more

A:Problem when creating batch file for shutdown multiple computers in LAN

Since the command line version works, Here's a BAT file that opens a shell for each command. I use this all the time for running different instances of robocopy. Should work for you.

------- shutitdown.bat -------
Set WshShell = wscript.createobject("wscript.shell")
wshshell.run("shutdown -s -m \\test1....")
wshshell.run("shutdown -s -m \\test2....")

Read other 2 answers

For Windows 2000/2003

I know that I will eventually figure this out using some spectacular (to me) FOR command but I have a feeling this would be so easy for a seasoned batch file writer to just pound out in a few secs/mins.

Ultimately I would like to have a batch file that searches through a directory and all subdirs to find all files that are 0 (zero) KB in size and then copies the files to a temp location keeping the directory structure intact.
If copying them is not possible while keeping the dir structure intact, a report listing what filenames are in what directory would be okay.

Appreciate any assistance!



A:Help creating batch file to search subdirs for files of a specific size

This is actually really ugly to do in pure vanilla command script.

The listing part you can get in 2 seconds anywhere anytime by using:
for /f %i in ('dir * /a-d/b/s') do @if %~zi EQU 0 echo "%i" >> zerofiles.txt
zerofiles.txt will contain full list of zero byte files.

The batch script was harder - only because it's hard to do string replacement without better string manipulation programs like sed etc. Also it requires the delayed variable expansion support to be enabled (start cmd /V:ON) or follow cmd /? for instructions on turning it on permanently.

@echo off

if "%~1"=="" echo %~nx0 requires Destination folder as an argument &goto end
set ROOTDEST=%~1
if NOT "%~2"=="" set ROOTSOURCE=%~2

call :GetSizeRootSource "%ROOTSOURCE%" "%TEMP%\%RANDOM%.junk.txt"

for /f %%i in ('dir * /a-d/b/s') do @if %%~zi EQU 0 call :CopyZero "%ROOTSOURCE%" "%ROOTDEST%" "%%i"
goto end
REM *** there's no length command in basic cmd script so we'll use hack
REM *** dump string to text file and get size of file minus two (CR/LF)
echo %~1>%~2
del %~2 > nul
goto :eof
set Skip1Char=%~1
set Count=%~2
for /L %%C in (1,1,%Count%) do call :Skip1Char %Skip1Char%
set SkipXXChars=%Skip1Char%
goto :eof

REM *** this function ... Read more

Read other 1 answers

Hi folks. I want to put a batch file together that will delete all files at the user profile in the following directories when my users log off:

C:\Users\USER\AppData\Local\Microsoft\Windows\Temporary Internet Files

Help would be appreciated!  Thanks.

A:Help creating batch file that will delete all user profile temp files on logoff.

A simple del command line may not work, because you do not have access on the temp files of other users. If you still encounter problems after trying this suggestion, I recommend that you discuss it in our Script Center, you may need a VB script that can
ignore UAC.
The Official Scripting Guys Forum! 
Arthur Xie
TechNet Subscriber Support in forum  

If you have any feedback on our support, please contact
[email protected] remember to click ?Mark as Answer? on the post that helps you, and to click ?Unmark as Answer? if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ?

Read other 6 answers

there 60+ scripts in my project ,when i run my bat file. only 3 scripts run.what might be the issue

Read other answers

Ok I'm totally at a loss on how to word this so I'm just going to write it out the best that I can...

First I have a batch file that I'm writing that will convert mp4 files to mp3 files (I have a lot) for a buddies band using ffmpeg.

Here's the code that I'm using:

ffmpeg -i folder\video.mp4 -f mp3 -ab 160000 -vn "\different folder\music.mp3"

what I would like to do is add to this so that I don't have to write out this code for every file I have... :/

I have the mp4 files in one folder and than the mp3 files are saving to another folder.

So here's an example of what the code will do if it isn't clear yet.

Folder 1:


what it should do is grab video1.mp4 and convert it.

ffmpeg -i folder\video1.mp4 -f mp3 -ab 160000 -vn "\different folder\music1.mp3"

and than move onto the next one

ffmpeg -i folder\video2.mp4 -f mp3 -ab 160000 -vn "\different folder\music2.mp3"

and than the next one

ffmpeg -i folder\video3.mp4 -f mp3 -ab 160000 -vn "\different folder\music3.mp3"

It's going to have to grab the name from the mp4 file and insert it for the mp3 file.

I can get around pretty good in cmd if it's basic commands but when it comes to something like this I'm a little confused...

Thanks for the help in advance!
I'll see what i can do about searching some more on what I would have to do and if I find the solution I'll post it here if it isn't already answered.

A:Batch File that grabs file names from folder to insert into batch file

A DOS "for /f" loop should do the trick, although changing the filename extension for the output to do everything in one line escapes me at the moment.

Perhaps you could do a dir .\folder\*.mp4/s/b > mp4s.txt, then make a copy of that and edit each line to rename the file to the destination name, and save it as mp3s.txt. Then you just feed both the source (mp4s.txt) and destination (mp3s.txt) filesnames into the for /f loop which handles the ffmpeg conversion.

Quite a crude solution and you'd have to handpatch the destination filenames, but i can't think of how to get a source mp4 filename and then just change the extension.

Read other 3 answers

I have a question  that how to copy file from remote desktop user drive to my local machine using  xcopy or any other protocol.

This is my server path "\\Trail01" and here is the file location "c:\Users\ashique.sheikh\Desktop\Day2.R"
How can i give this is in my batch file. I have used this
net use "\\Trail01" "[email protected]" "/USER:ashique.sheikh"
XCOPY /Y \\Trail01\c:\users\ashique.sheikh\Desktop\Day2.R  "D:\VMI"
But its not working. It is give path error.
How can i download this or is there any other way to do it?

Read other answers

If someone can Please help, I just need the Data in the XML tag extracted to Batch File Variable....the rest i figured out and works great for the backup...just need the extracted tags...
thank you

i have a parent directory that contains a sub directory and a XML file that i need a batch to read 2 specific tags then create a Set command in the batch with those 2 lines to create a backup folder with the tags as the names and such. looks like this:

Parent Directory = XML
XML Folder contains > WJFKB02229001.D Folder & Config.xml File

I need to read the contents of the xml "Config.xml" extract the PhaseID Tag data "WJFKB02229001"
Also need to extract the BoxID "D", I don't need anything else on these seperate lines.

keep trying the following For /F command but no luck
[COLOR=red]for /f "tokens=1 delims=[" %%G in ("PHASEID" %path%\%myfile%) DO ([/COLOR]
[COLOR=red]set PhaseID=%%G[/COLOR]
[COLOR=red]echo Phase: %PhaseID%[/COLOR]

and i've searched so many sites and forums with no real help on this one....the data is contained in the xml, weird enough i guess that it's enclosed in brackets "[", which all the forums i read and try it either replies with a blank variable being passed or says it can't find the file at all....



Set PhaseID="[COLOR=red][B][I]Extracted PhaseID from xml[/I][/B][/COLOR]"
Set BoxID="... Read more

A:Solved: Batch File Extract TAGID to Batch Variable? weird

Read other 16 answers

Hi guys,

I have a task from my belkin flip KVM that loses its task icon pretty frequently, but the process is still running.

I've made a batch file

taskkill -IM flip.exe
this works fine in killing the flip.exe

what i'd like though is kill the exe then pause for 4-7 seconds and then start the flip.exe again. I'm not a programmer in any way, so if anyone can help it would be great.

(it's driving me flipping mad!) LOL

A:creating a batch taskkill?

got reference for a pause...but I'm not sure if I'm implementing it correctly....and the start command just makes the cmd window stay open and flip doesn't start. again syntax is totally wrong me thinks.

taskkill -IM flip.exe
PING -n 1 -w 5000 >NUL
START "C:\Program Files (x86)\Belkin\Flip\flip.exe"
anyone got any ideas?

Read other 2 answers

Hi there,
Is it possible to recover your windows xp using batch files?
and if it is possible how to create batch files.

Read other answers

I would like to know how to create a .batch file and have it run at the shut down of the computer,Here are the commands:

netsh int ip reset reset.log
netsh int ip delete arpcache
netsh winsock reset
ipconfig /flushdns


A:Creating .batch to run at shutdown

Task scheduler can set it up to run at startup or at login, but I do not see a method to do it at shut down.

You can use the group policy editor since you have Windows 7 Ultimate. See Schedule a task to execute at shutdown or logoff - Tech Support Forum for how to setup a task to run on shutdown using the group policy editor.

Read other 3 answers

here is part of my current working batch
SET /P DICTATOR=Copy the actual dictators name (ie toabmcgehee) and paste it here: C:\Users\Administrator\Desktop\txt.wav.pairArchive\
SET /P FILEMONTHS=Choose the month worth of files you want to copy in the format MMYYYY:
xcopy /V "Z:\DataStore\VocalEZ_File_Storage\%DICTATOR%\%FILEMONTHS%\*.txt" "C:\Users\Administrator\Desktop\txt.wav.pairArchive\%DICTATOR%\"
xcopy /V "Z:\DataStore\VocalEZ_File_Storage\%DICTATOR%\%FILEMONTHS%\*.ogg" "C:\Users\Administrator\Desktop\txt.wav.pairArchive\%DICTATOR%\"

now currently i am using the xcopy to copy all the .oog and .txt files in the folder which i highlighted red.
but i need to copy specific files most of the time.
i currently have a txt file labeled list on my desktop
what i am wanting to do is copy a string of file names to list.txt and when i run the batch i want it to
pull the file names from the list and copy only those specific files throughout the rest of the batch instead of all the files

A:Solved: need help creating a batch array

Read other 10 answers


I'd just like to run a simple batch file at logoff to backup some settings. I plan to use Robocopy, which is what i use to more thorough backups.

Two questions:
1. How make it run by clicking Start > Shutdown? (i realise i could make a shutdown batch file and run it instead, but i'd rather keep a standard 'workflow' for other users who use the machine.

2. I'm 'ok' with batch files, but i've never tried to mirror to a different folder each time (automagically). What i'd like to do is have it backup a folder and call it "blah.1" then "blah.2" each time it is run, and then repeat once it gets to "blah.9" so it doesn't keep growing forever. I don't know how to do this.

I realise no.2 is not really for this forum, but someone might know and i might as well ask


A:How to run a batch file at logoff & some batch scripting help please

I found an answer to the logoff/shutdown:
How to schedule a task to run when shutting down windows - Stack Overflow

And the batch file folders:
robocopy - Insert current date in to destination folder structure - Stack Overflow

Read other 1 answers

I have a laptop and am always having to or should I say want to close processes that don't close when I close programs.....

Usually there are three or four processes per program.....

Can someone help me with a basic batch file to write so close the processes I want all at once.

Thanks Alot

A:Help Creating Batch files to Close Processes...

What are these processes and are they a part of the listed OS services? If they are not services you cannot stop them from the command line.

Read other 3 answers