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
3
votes
3 answers

slmgr.vbs supress dialog

We use a batch file with the following content to activate our windows domain computer after imaging: slmgr.vbs -ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX slmgr -ato This works well, but there is a problem: after each command a dialog box appears and the…
dtech
  • 633
  • 2
  • 10
  • 27
3
votes
3 answers

Batch script to download many files via http?

I have a list of urls (over 100) of patch files from various sources that I need to download. I need to create a batch script that will download these files and dump them all into the same directory. I do not have administrative privileges on the…
MathewC
  • 6,957
  • 9
  • 39
  • 53
3
votes
4 answers

Remote installing programs by scripts or batch files

Firstly, I can't use Group Policy as our team doesn't manage that. The company is a massive FTSE company with a team for every aspect of IT you can think of. Our team needs a way of installing programs remotely either by batch files or scripts…
stead1984
  • 577
  • 8
  • 16
  • 32
3
votes
3 answers

Get folder and file names and store it in a variable in windows?

I have a folder folder1 contain 3 files file1, file2 and file3, etc. I need command line to do the following task. Store the name of the files in a variable because I want to write a dynamic batch.
3
votes
1 answer

how i can pass a file directory (path) as parameter?

how i can pass a file directory (path) as parameter to batch file in windows operating system bash file in unix operating system
Mohammad AL-Rawabdeh
  • 1,612
  • 12
  • 33
  • 54
3
votes
2 answers

Automated method to convert .reg registry file to reg.exe commands

Occasionally I need to put registry entries into batch files to use in login scripts, unattended installers, etc. While it's pretty easy to add one or two registry commands to a batch file using reg.exe, when there is a large amount of registry…
nhinkle
  • 567
  • 3
  • 17
3
votes
1 answer

How to move all files except the newest one to a folder?

I have a Windows box and a folder containing such files: 2010-07-04 20:18 81 in01_Acct_20100704001.r 2010-07-07 05:45 165 in01_Acct_20100706001.r 2010-07-07 19:41 82 in01_Acct_20100707001.r…
suyao
  • 31
  • 3
3
votes
3 answers

Executing a long command at the windows xp command prompt

Im using WindowsXP and i want to run the following command: tomcat6 //IS//AlfrescoTomcat --DisplayName="Alfresco Community Edition" \ --Description="Alfresco Tomcat Bundle - Repository and Share"…
Jim
3
votes
2 answers

Spaces in SETX PATH command

Suppose my PATH is C:\WINDOWS\system32\;C:\Program Files\Important\ SET NEW_PATH=C:\My\Dir\ SETX PATH "%PATH%;%NEW_PATH%" Results in a path of: C:\WINDOWS\system32\;C:\Program Files\Important\;C:\My\Dir" Notice the quotation mark at the end of the…
3
votes
2 answers

eventcreate with multiline description

I'd like to use eventcreate from a batch file to log the results of a file copy job (robocopy). What I'd really like to do is use the output of the file copy job as the description of the event (/D of createevent). The trouble is, there are…
3
votes
1 answer

Windows Server 2008 - Windows Server Backup - Email Alerts

I would like to create a script that emails me when a scheduled daily backup runs. I'd prefer the email to indicate success or failure. I understand that this is not an easy thing to do with Windows Server 2008. Is it possible? If so, how? Thanks
3
votes
3 answers

Windows Server 2008 CMD Task Schedule not running

I have a BAT/CMD file that when run from the command prompt runs completely. When I run it through the Task Scheduler it partially runs. Here is a copy of the file cd\sqlbackup ren Apps_Backup*.* Apps.Bak ren Apps_Was_Backup*.* Apps_Was.Bak xcopy…
Jonathan Platovsky
3
votes
3 answers

How to get all processes under a session of a particular process that is using a port in Windows cmd

I want to list and kill all processes belonging to a session of a particular process that is using a port. This should happen through a windows batch command that would accept a port number as input. For example: Let us say a process PA is currently…
3
votes
1 answer

Command understanding in Batch script

I have a batch file which invokes a tool. Now i face an issue in the batch file at a for loop. But with all research about the Batch script, I am still not able to make out what the expression is trying to say. I have turned to this forum for the…
MitSM
  • 33
  • 4
2
votes
2 answers

Change directory to "This PC" / "Computer" from .BAT batch file

I'm using a batch file to automatically launch a software at login. This software maps a remote drives to which one letter is assigned (R:) and opens the file explorer to R:. I would like to append a line to the batch file that would change the…
OuzoPower
  • 347
  • 1
  • 4
  • 11