A batch file is the name given to a type of script file, a text file containing a series of commands to be executed by the command interpreter under MS-DOS and Microsoft Windows.

learn more… | top users | synonyms (1)

2
votes
2answers
167 views

Change windows group permissions without the sufficient rights in a batch

I wrote a batch file, which creates multiple folders und subfolders in the current directory. The group permission of one folder is also changed. This works on my local workstation with administrator ...
1
vote
2answers
88 views

computer startup script reporting success to a server

I am using Group Policy to deploy a computer startup script that tries to uninstall one program and install another. I need this script to report its status (whether a certain file exists on the ...
2
votes
1answer
126 views

NFS drops out when .bat script is run

I have a .bat script that runs from a Windows 7 machine. Part of the script is to use plink to ssh into a Red Hat machine and run a couple commands. I have about 4 or 5 plink commands within the ...
1
vote
1answer
74 views

Disable NIC advanced properties in Windows server 2008/2012

I have some Rackspace VM's and need to disable these advanced NIC properties: Correct TCP/UDP checksum value IPv4 checksum offload Large receive offload Large send offload version 2 TCP checksum ...
1
vote
1answer
85 views

if exist !SOMEPATH! not working in batch file

I have a batch script in which i am using multiple if exist statement, the problem is all statements are working except one . Following variables are set SETLOCAL ENABLEDELAYEDEXPANSION SET ...
1
vote
1answer
288 views

Running multiple instances of a Batch file in windows simultaneously?

I have a windows batch file that is invoked by windows scheduler. When I try to have multiple windows scheduler tasks trying to run the batch file simultaneously, the batch file is locked by the first ...
1
vote
1answer
1k views

rsync unexplained error & received SIGINT, SIGTERM, or SIGHUP

I created a batch script to back-up our server: #!/bin/bash user=$1 # create user dir ssh root@local.backup.tst -p 5774 mkdir -p /var/backup/server.tst/incremental/$user # backup mail dir rsync ...
1
vote
1answer
260 views

How to issue an rsh command in the background?

How to issue an rsh command to run in the background? Example: within a batch file i call rsh 10.1.1.2 -lroot /etc/rtcinst/myscript.ksh which runs on a remote unix machine. This script takes a ...
1
vote
1answer
267 views

How to limit SMTP delivery to hourly batches

Moved over from StackOverflow. Sorry if you saw it there first In an effort to keep us from being labeled spammers by major ISPs (in addition to SPF records, privacy policies, CANSPAM compliance and ...
0
votes
1answer
384 views

How to reference Domain-Admins with icacls?

I need to reference the "Domain-Admins" group in a batch file. The line in question looks like this: icacls "test\folder" /grant mydomain.com\Domain-Admins:F ... and works as expected. But how do ...
0
votes
1answer
985 views

How do I delete a remote file using NCFTP (Windows client)?

With ncftpput.exe how do I delete a remote file once logged in? I have tried using the -W option to send a Raw FTP command but cannot get it to work. Has anyone got a working example? Have tried ...
0
votes
1answer
85 views

How to remove a line in a file found in multiple directories

There is file that exists in each user profile directory and I need to remove the line from the file in each user profile directory. I'm using a batch script to go through each user profile directory, ...
0
votes
1answer
676 views

Why does BitsAdmin.exe not finish a download and leaves just a tmp file?

Still learning how to use BitsAdmin.exe in batch files. Here is my script, which fails to finish downloading a file, and leaves just a temp file called "BIT851.tmp" on my desktop. Any idea what I am ...
0
votes
1answer
254 views

Problems encoding an HTA file to run Java+Batch files for DNS server

I'm having a problem coding a .HTA file, and I really need some help. I've been searching all over the place and I can't seem to find what I need to add to this code to make it run. I'm trying to get ...
0
votes
1answer
1k views

Server 2008 issue running batch file

For the life of me, I can't seem to get a batch file running in Server 2008 Task Scheduler, despite it not having the common problems I've seen before. Problem so far: I have a batch file that ...
0
votes
1answer
200 views

Install cmd script to set user environment variables from file

Each line in input file.txt has two values separated by a space. Currently using: for /F "tokens=1,2" %%i in (file.txt) do call :setvars %%i %%j :setvars set %1=%2 set %3=%4 set ...
-1
votes
1answer
184 views

portqry to check connectivity

Is it possible to check the connectivity between 2 remote servers using portqry given that the portqry.exe command is executed on another server. for example, check the connectivity between serverA ...
-1
votes
1answer
1k views

Create Batch file to execute multiple batch files and VBS files

I have multiple batch files and vbs files , when i try to create a batch to call them it stop after the last batch file and dont execute the vbs. without giving any error if i put the vbs at the ...
-1
votes
1answer
538 views

Copying a set of local files to ftp

I want to copy a set of local files to ftp://124.30.124.230 (it will ask for a username and password). I want to do this work on 400 systems so I have planned to do this work by creating a batch file ...
2
votes
0answers
272 views

Access Denied error when running xcopy in jenkins on windows 2008 r2

I have installed Jenkins on a Windows Server 2008 R2 and in the build script i use xcopy to copy the generated war file to a specific folder The problem I am having is that every so often the build ...
1
vote
0answers
58 views

Powershell-Script is not exectued correctly

I have a power-shell-script which is called by a batch-file. The batch calls the script after it has set the execution policy to unrestricted. Currently the script does nothing more than writing a ...
1
vote
0answers
189 views

Trying to run a netsh batch with foreign characters

I am trying to run a batch file with the following content: netsh interface ip>set dns "Połączenie lokalne" source=dhcp The file is saved as ANSI. My Windows codepage is 1250, the OEM one 852. ...
1
vote
0answers
119 views

Windows file compare (FC) spurious differences

I'm getting differences like this: a.txt Betty Davis Cathy Edwards b.txt Betty Davis Cathy Edwards There are only two lines listed in the diff (which doesn't ...
1
vote
0answers
144 views

scheduledtask to update svn directory creates multiple processes

We have a fairly standard web setup, with a windows 2008 server hosting our website and the directories being under control of SVN, with tortoise SVN as the preferred provider. One of the SVN folders ...
1
vote
0answers
81 views

Why is my IF comparison op failing?

update SOLVED - the problem is not with my code. there is a design limitation (some might say "bug") in the command processor. the IF comparison operators do not work with values higher than ...
0
votes
0answers
11 views

One location to other location through the move specified files names only

I have so many files move to one location to other location through the move specified files names only . a .txt with a list of name files: 101.jpg 222.jpg 205.jpg etc. ... I need a script that ...
0
votes
0answers
266 views

Error: “Parameter is incorrect” when opening 0b bat/cmd

Having sort of issue that is more likely annoying when need to create short batch script (though it's not scripting issue). I want to right-click on desktop and create new text file. Rename it and ...
0
votes
0answers
176 views

Output results of findstr at a Batch file so they can be read by PHP

I have this Batch file which looks for a string through a the files in the current folder: @echo off for /f %%i in ("*") do ( findstr /m /C:color "%%i" ) Now I would like to output the ...
0
votes
0answers
75 views

Batch script terminates too soon

I need some help with Windows batch/CMD scripting. I wrote a script to record mic-in to a MP3 for 12 hours. It runs ok when running it manually. It will run with task scheduler too - just that, ...
0
votes
0answers
126 views

Registry Export Using Script Run from CD Fails - Access Denied

I've written some scripts and .bat files to configure XP machines and I have created a CD with all these scripts on and execute them through a single setup.bat file which is also on the CD. One of ...
-3
votes
0answers
27 views

Next drive letter available after C:

Using a batch script, I want to capture the next existing drive letter after C: into a variable. If none exists, only then assign C: to that variable. I tried the below code, but it shows next drive ...