Questions tagged [batch-file]

batch files are simple text files executed in a command to achieve a particular task or a set of tasks

batch files are text files containing commands executed in sequence to achieve a particular task or a set of tasks. They can be very simple, or can contain complex logic.

440 questions
0
votes
1 answer

import configuration file when batch start ? (OS=Windows)

I write batch file and it has a large number of variable so i decided to put all variable on text file (conf.txt) and import it at the beginning of batch file so please i need the command line do this task (import the conf.txt to the batch file) and…
Mohammad AL-Rawabdeh
  • 1,612
  • 12
  • 33
  • 54
0
votes
5 answers

Send encrypted mail using GPG by command-line?

A few days ago I asked about how I can secure email and many people advised me to use PGP tool, and I read about it and I use it. Now I want to write a batch file to send encrypted email with attachments. I know how I can generate key, exchange key…
0
votes
1 answer

Changing client devices settings for all users in AD group

I have over 40 users in an Active Directory that need client printers disabled so I can go back and allow only a select few users this without disabling through TSconfig. Really looking for a script or something that can change enviornment settings…
Daniel
  • 109
  • 1
  • 8
0
votes
1 answer

How can a BAT script find the partition number of %systemdrive%

I am trying to write a BAT script to produce a grub4dos menu.lst file. A boot entry in the menu.lst file typically contains a line like: root (hdx,y) where x is the hard disk number(first disk hd0) and y is the partition number on the disk (first…
Wes
  • 1
0
votes
1 answer

Problem with relative paths(*.bat + VMWARE + Windows 2003)

I have posted this issue on StackOverflow but I thought this question might be a little more VMWare\Windows2008 server specific. Here's my question: I have two VMware instances of Windows 2003. I am trying to run a batch file that starts running…
sc_ray
  • 107
  • 1
  • 6
0
votes
1 answer

Batch file code to find and rename all files ending in a space?

We host Macintosh files on our Windows 2008 servers. They have files like somegraphic.eps ._somegraphics.eps (hidden) Many times our users will add non-standard characters to the files, like bullets and spaces at the end of the file names. It…
Zachary Scott
  • 227
  • 2
  • 14
0
votes
1 answer

Detecting whether on LAN from windows batch file

I'm setting up a couple of Windows laptops to mount home directories from our file server. The file server uses NFS for Linux clients and I've set up Samba for these Windows clients. At startup, I'd like them to mount using Samba when on the LAN and…
Alex S
  • 393
  • 3
  • 6
  • 16
0
votes
2 answers

Batch-script implementing 2 ODBC-connections

Thanks for all previous help! I have a question regarding av script. My computers is all XP, and needs the following when I do my thing : I have 2 ODBC-connections (towards MS-SQL-DB), which I have a username / password to create a connection…
Maclovin
  • 249
  • 1
  • 2
  • 11
0
votes
2 answers

What is wrong with this batch-script?

I've beeen trying to set up a batch-script which should do the following: First, install a exe file, preferrably quietly (of course check if it's already installed). Then traverse to where .net framework is installed. After the traverse, it should…
Maclovin
  • 249
  • 1
  • 2
  • 11
0
votes
1 answer

Script to check directory existence and install software

Firstly, please excuse my ignorance as I am completely new to scripting.. Here is what I am planning to do Stop the service (it would be good if i could check if service exists in the first place, otherwise, it should still continue on with the…
molecule
  • 83
  • 1
  • 4
  • 12
0
votes
2 answers

how i can make batch file in windows read the output of somthing from unix bash file?

i want to make incremntal backup for repository by the following command :- svnadmin dump myrepos --revision 1001:2000 --incremental > dumpfile2 but i want to copy the output on windows box as following :- svnadmin dump myrepos --revision 1001:2000…
Mohammad AL-Rawabdeh
  • 1,612
  • 12
  • 33
  • 54
0
votes
1 answer

Making sure a batch is run with admin privileges

We use batch files to do simple installations of COM servers - mainly a few file copies and regsvr32s. Since regsvr32 writes to the registry's local machine hive, the batch must be run with administrative privileges. I'd like to be able to recognize…
0
votes
1 answer

Batch Files..How Iterate over drives using wildcards

I would like to clear the contents of some text files that are in several sub-directories across 2 hard drives on my computer. I would like to do this by a batch file for my ease of use / understanding. Here's what I have so far. Can you help me…
Chris
0
votes
1 answer

Last Logged on User on Offline Windows Installation

Recently at work, I was wondering if there was a quick batch command I could use to look at some output and quickly determine which was the last user who logged on. Users do not have roaming profiles, and the local profiles often need to be…
songei2f
  • 1,934
  • 1
  • 20
  • 30
0
votes
1 answer

Script to copy file from server and install software

Here is what I want to do - I would like to install a software on every PC in my domain. I would like it fully automated. I am sure this can be done either using a batch file or a vbscript. Here is what I would like to do: Check if file exists on…
molecule
  • 83
  • 1
  • 4
  • 12