Windows Batch

11K

Solutions

8

Articles & Videos

10K

Contributors

Batch files are text files containing a script of commands that are executed by the command interpreter on DOS, OS/2 and Windows systems. Most commonly, they are used to perform a series of functions that are repeated -- copying a set of files created daily with one step, for example.

Refine results

Experts,

I have seen a lot of scripts, but can't seem to find one that will cover my needs. I need a script that will sync/ mirror two folders. The parameters of the script need to have the …

1028 views
3 Use Cases for Connected Systems
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Greetings,
I'm in the process of moving about 1.3TB of data from Disk3 (G:) to Disk6 (K:) on a Windows 2008R2 virtual server.  Once the data from Disk3 is moved, it will be wiped.  Disk3 is a …

1870 views

# Look for a variable
status="RUNNING"

# Loop and check variable %status%
status=checkstatus
# wait for 5 seconds
timeout /t 5
if status != "RUNNING" then
echo "finished"
exit

515 views

When I execute a command line execution. it returns an output like below.
task_name, description, 11, In_progress
task_name, description, 12, In_progress
task_name, description, 13, In_progress

515 views

I am needing to create a windows batch file that runs wmic OS get OSArchitecture > stores the output of whether 64 or 32 bit into a variable called "arch".

Basically, this is what I want to happen:…

213 views

I have a script that builds some files on the fly.  Every file created needs the last line to be !

I can't figure out for life of me how to get it to work....

(CODE)

815 views

I have a batch file (.bat) that I need to run on a Windows 2012 R2 server.

When I click on batch file on the C Drive the batch file runs without a problem.

I have the batch file scheduled to run…

830 views

Hello fellow experts!

Running into an issue with a batch file we have, with the purpose to install windows updates offline.

(CODE)

The above works great, but ONLY if it is run in a local …

740 views

I am working on a migration project with a large number of files that are divided by year. The file name includes the year it was created, but when I want to move them based on this it doesn't work:

531 views

Hello,

I use rhs from a Linux machine to execute some .cmd script on a remote machine. That script runs fine (remote ...), but I miss a way to retrieve the script's output and exit code.

The …

1338 views
DevOps Toolchain Recommendations
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Hello experts,

I have more than 100 schedule tasks set up with the same user already exported in a specific folder that I want to massively import it in a new server.



I know that there is …

1544 views

Hi,

I need to write a windows batch script which should keep on checking if a file exists in a specific directory.
If exists do something;
else wait for 2 minutes and check again
can anyone …

832 views

I have a batch script to extract data from server.If any commands fails in the below scipt then exit the batch program and save the error in a text(log)file.
Can anyone help me how to implement this.…

425 views

I need to gather information form over 100 thin clients and I was hoping to use WMIC command line tools so I don't have to log into each machine.  These machines are not on our domain so I'll need to …

526 views

I have 2 data files (CSV) which I would like to compare on a daily basis. Each line in these files consist of a data row which we import into a database.Please help me to
do the following.
1. …

1124 views

I want to use a GPO script to write the computer name to a logfile.txt file in a shared folder

Here's my script

@echo off

pushd \\cityhi-host1\studentsoftware

FINDSTR "^%computername%" < …

1830 views

How can I  display time like '30-JAN-17 03.41.49.613738 PM'

228 views

Hi All,

I have the PowerShell script below that scans the folder (and sub folders) C:\Temp and outputs the results to a CSV.

(CODE)

This very works pretty well.  Does anyone know how I get …

1758 views

I am wanting to find the newest text file in a folder, and copy it somewhere else. I have a working version, but if a file in a subfolder has a newer date it will copy that instead. So i need to only …

527 views
Live: Real-Time Solutions, Start Here
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Using ROBOFTP I want my script to unzip all zip files within the working directory.  is this right?

UNZIP "*.zip"  "\\Server01\Jobs\\working"

I put that in my last line.  I have my cmd logging …

139 views

We have Windows 2008 R2 and we made a task that run in OS startup and higher options. Now the problem is we installed Active Directory and AD replaced the logins now for aaaa@ourdomain.com for example…

443 views

For loop syntax is confusing, I tried researching and I still wasn't able to make sense of the syntax. This is a very simple script and it does the following:
1 > Recursively loop through current …

833 views

Hi guys

We did a fileserver migration. Low and behold, some folders did not copy across to the destination due to NTFS permissions, which we have now resolved.

However, everybody is now working…

241 views

I am trying to get a package name (which varies on each computer, but all have in common the string "embeddedlock") in order to pass to DISM /Remove-Package command.

If I run:

(CODE)
Then I …

944 views

Have a cert that needs to be installed on a group of machines, deployed a simple bat file that calls the certutil command, but no matter what it prompts users to accept, is there a way to just get the…

351 views
Show more content
201506-LO-Top-001

TOP EXPERTS

view all

RELATED TOPICS view all topics

  1. VB Script
    (36,397)
  2. MS DOS
    (13,205)
  3. Scripting Languages
    (26,514)
  4. Programming
    (52,029)
  5. Windows XP
    (118,274)
  6. Windows Server 2003
    (128,563)
  7. Shell Scripting
    (9,842)
  8. Powershell
    (14,547)
  9. Windows OS
    (101,328)
  10. Active Directory
    (73,213)