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
2
votes
1 answer

batch file to dump data from database and dynamically name the file name

I have a batch process that dumps data from my database (windows 2008 r2) and I'd like to dynamically name my file with the day of the week included. is that possible to do with a simple .bat file? if so how?
2
votes
2 answers

Passing CMD via PSEXEC to a remote computer via .BAT file

Using PSEXEC to call CMD for a DEL command on a remote computer through a batch script. PSEXEC \\hostname -u username -p password CMD /C DEL /Q /F C:\Folder\File.txt The script pauses with a new CMD window popped up connected to the remote…
2
votes
1 answer

Enterprise Version Inventory for Adobe Reader 7,8,9,10

Is there a tool or method to build an inventory of the version of Adobe Reader installed on computers in a domain? This would allow specific targeting of Adobe Reader updates to the computers who needed it, say from version 9 to version 10. If I…
Steve
  • 365
  • 2
  • 7
  • 18
2
votes
1 answer

Windows batch file executes some commands that return output over and over

I tried to put commands that return output into batch file. When I run the batch file it executes the command over and over until I cancel with CTRL+C. I observed this behavior in Windows CE, Windows XP, Windows 7 and Server 2003. At first I thought…
Dean
  • 1,009
  • 3
  • 10
  • 19
2
votes
2 answers

mysqlcheck doesn't support multiple contradicting commands

Any idea why I am seeing this error message? This script works fine on a ever so slightly older version of MySQL running on a different server with a similar config. :: check/analyze/repair/optimize @echo. @echo Check Tables %MYSQL_BIN%\mysqlcheck…
Chris
  • 299
  • 2
  • 4
  • 9
2
votes
0 answers

Trying to install PEAR (running go-pear batch file) - getting "php_pdo.dll is missing" error

I need PEAR installed. So, I tried running the go-pear batch file inside by PHP extract. But it gives this error - The program can't start because php_pdo.dll is missing from your computer. Try reinstalling the program to fix this. But I have that…
Sandeepan Nath
  • 647
  • 6
  • 13
  • 29
2
votes
7 answers

How do I figure out which file is being executed?

I have two files: abc.exe and abc.cmd - both along the path somewhere. abc.exe is a command-line utility. abc.cmd is a wrapper around abc.exe. When I type "abc" in the command prompt, how can I figure out which file is being run and the full path…
user10014
2
votes
4 answers

possible efficient ways of transferring files from one server to another

what are the possible good and efficient ways of transferring files from one server to another? In this case it will be from windows server 2003 to windows server 2008 r2. I am thinking Powershell cmdlets or batch files could be a help here but not…
2
votes
3 answers

Shortcut to open IIS 7 Manager so it Shows "Sites" view (status) by Default?

I would like to quickly be able to check whether a site is online after logging into the desktop of Windows Server 2008 R2 (x64). I would prefer to be able to do this in just 1 single or double-click (or better yet, without clicking at all) than to…
2
votes
6 answers

How do I run a batch file on a local network as Administrator? (Vista)

I have a couple of batch files which must be run as Administrator. I can do so if they are on my machine, but when I put them on the network and then try to run them as Administrator, the command prompt simply shows no output and finishes,…
Paul Williams
  • 123
  • 1
  • 2
  • 7
2
votes
1 answer

Running an application as a different user (.bat / .vbs)

I need to restart an application using a service running on the SYSTEM account. The problem is that the application is then also started under the SYSTEM account. For various reasons beyond my control the restart system is a bit complicated but as a…
Skrealin
  • 123
  • 1
  • 3
2
votes
2 answers

Why does the Windows command line change the command when running from a .bat file?

If I want to run the command md5deep -rb . | find /I ".jpg" | sort > local.md5 and I run it from the command prompt, it shows exactly like how I typed, but when I put it in a .bat file and run that, this is what I see: md5deep -rb . | find /I…
hyperknot
  • 701
  • 2
  • 9
  • 16
2
votes
2 answers

Batch Command Question

I want to make a batch file that designated as a folder name date of a previous day.How can I do? Here is my batch file. Set Tarih1=%date:.=% d:\ cd \ Yeni Klasör md %date:.=% cd %date:.=% thanks in advance.
Cell-o
  • 327
  • 4
  • 15
  • 32
2
votes
1 answer

Create self extracting (.exe) zip from the command line

Trying to automate a manual procedure in place currently. This is on a Windows 2008 server. Is there a method to create a self extracting (.exe) zip file from a commandline/batch file?
Martin
  • 572
  • 4
  • 14
  • 26
2
votes
1 answer

VirtualBox on Windows Hosts | Export and Import batch automate

VirtualBox on Windows I am planning to deploy virtual box on around 10 computers (Vista / 7), I have setup a centos vm and exported it as an appliance with the ovf and vmdk files in the same folder. Question Regarding VM Deployments : Assuming VBOX…
Mutahir
  • 2,357
  • 2
  • 32
  • 42