-3
votes
0answers
58 views

How to write batch script for App server which will make output a file on to SAN

We have a batch Script with the name “boo.bat” which is trigger by the MainFrame Job say name “M” The batch script is written below which checks if Mainframe system is able to connect our App server ...
0
votes
0answers
73 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 ...
1
vote
1answer
103 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 ...
2
votes
1answer
66 views

batch - File last modification time with seconds

I want to know when a file has been modified for the last time. I can get these infos using the following batch script: FOR %%i IN (myfile) DO SET modif_time=%%~ti The problem is that I need ...
0
votes
1answer
104 views

Batch script - How to release a locked file for batch 'copy'

A daily windows scheduled task triggers a batch script which moves program files to a folder on a server, using a simple copy routine. rem deploy programfiles copy dailybuild\*.dll ...
0
votes
1answer
262 views

.bat file - Nagios v3.2 service check and start if stopped

I'm just barely getting into programming so I do apologize for my ignorance. I'm trying to create a .bat file that will check if a service is running on XP Pro. If service is running it will exit 0. ...
0
votes
2answers
141 views

Batch File to Loop Through Folders and Process If Specific File Found

I have a large number of websites running the same CMS that I want to update as a batch. As the update process just requires copying the updated files into the folder of the given sites, a batch ...
0
votes
1answer
114 views

Windows batch find folder if statement

Assume a file system with the following format Folder A --->Folder 1 --->Folder 2 --->Folder 3 etc.. Folder B --->Folder 4 --->Folder 2 --->Folder 3 Folder C --->Folder 1 --->Folder 2 --->Folder 3 ...
2
votes
1answer
629 views

Batch - how to copy file by minimum size and date modification?

I have this simple batch script which copies the newest file in some dir to another place. I want this script to also ignore all files (in the DIR command section) under 1GB of size. FOR /F ...
1
vote
2answers
761 views

RoboCopy A File From The Web?

Is it possible to download a file from the web using RoboCopy? What would the syntax for that be? Here's what I'm trying: RoboCopy "http://www.google.com/" "C:\some_folder\" "index.html" /L /V /E ...
0
votes
0answers
117 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 ...
1
vote
3answers
1k views

How can I hide ms-dos window when running a .bat file?

I am running a .bat file for my script (Scheduled Tak (CronJob)) per minute. When it run, seems ms-dos window short period of time. My batch code like this; @ECHO OFF C:\wamp\bin\php\php5.4.3\php.exe ...
26
votes
3answers
46k views

How to sleep in a batch file?

How to pause execution for a while in a Windows batch file between a command and the next one?
2
votes
3answers
668 views

Using a for loop in Microsoft cmd.exe, how can I process only the files with a certain extension?

I have a the folder c:\test\ and two files in it a.txt and b.txtv. I would like to process just the files with extension equal to .txt. If I write this commands cd c:\test for %f in (*.txt) do echo ...
1
vote
1answer
857 views

batch file infinite loop when parsing file

EDIT: Apparently I don't have enough rep to answer my own question, so the answer is going here. OKAY! SO! I didn't exactly solve the problem... but I stopped using cacls.exe and started using ...
0
votes
1answer
574 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 ...
2
votes
3answers
378 views

I need to clear out the same directory on multiple servers across a network. How do I do this?

On multiple (about 20) servers, there exists the same directory C:\Deployments. This directory has multiple subfolders which contain more subfolders and files. The C:\Deployments directory itself ...
0
votes
1answer
618 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 ...
1
vote
1answer
737 views

command line REGEDIT command (edit) without a popup

I am attempting to disable UAC via a batch file with a REGEDIT command, and everything works - but, I need to be able to do this without clicking. When I run the: REGEDIT /S somefile.reg It works ...
1
vote
3answers
133 views

Running a batch file as an admin

Is it possible to run a batch script as an administer? We need this to be done without any user interaction, so there can't be any password prompt or UAC popups - is this possible?
2
votes
3answers
2k views

keep command window open after running bat file

i have a bat file that has the following it: sm start "Schedule" this code runs but the command window closes immediately what can i put inside the bat file to keep the window open?
0
votes
2answers
276 views

Batch command to schedule multiple servers to shutdown

Our company is in the middle of a move between buildings. I've been asked to schedule the majority of our servers to shutdown at midday tomorrow. They already have a scheduled task for this, which ...
1
vote
1answer
442 views

more than one start statment in the same batch file?

I wrote the following batch file: start D:\folder1\bin\run.bat start D:\folder2\bin\run.bat start D:\folder3\bin\run.bat start D:\folder4\bin\run.bat It executes the first start but then gives me ...
1
vote
3answers
967 views

.bat files to find all files on drive bigger than X

So far I run a .bat file to find all the media files stored on our student shared drive, which then writes to a .txt file in my documents, for example: dir S:*.mp3 /s > "M:\logs\student\mp3.txt" ...
0
votes
2answers
927 views

Batch File help needed for PsList/PsKill when a process is over a specific age (elapsed time)

I'd like to request some help in creating a Batch file to run on a windows server which will monitor processes which sometimes get "stuck" and linger after they should be killed. Specifcally, I can ...
2
votes
1answer
8k views

SQL, pl/sql, sqlplus: how to return a variable to DOS batch file?

I have a DOS batch file which invokes sqlplus, which executes some basic SQL contained in another .sql file, and I want the last part of it to return a value back to the dos batch file. However, ...
1
vote
1answer
2k views

Calling a batch file using relative path

Oh gosh, gotta expose myself as a noob here ;) In Windows, I need to execute a batch file in a subdirectory of the working directory. However, just running subdir/foo.bat cmd1 cmd2 does not work, and ...
1
vote
2answers
390 views

Bat file in another account

I have a bat file which will delete files in some folder (Profile Folder). But i do-not have access to that folder. But another account has access to the folder. How to run a batch file from one ...
0
votes
2answers
2k views

Checking file properties in a batch script?

I have a batch file from a vendor to patch some software on a Vista machine. I'm going to be using GPO to push it out as a startup script. My problem is some systems require this software and some ...
0
votes
3answers
1k views

read an unknown directories name + copy to it

I would appreciate some help please. I am trying to copy two files "test1.txt" and "test2.txt" into an unknown directory, e.g. into the directory "%USERNAME%\Documents\test\04pql7hw.example" The ...