Check the file size using Batch script in windows

 
Thread Tools Search this Thread
Special Forums Windows & DOS: Issues & Discussions Check the file size using Batch script in windows
# 1  
Old 02-03-2010
Check the file size using Batch script in windows

Hi,

I need to check the file size using a batch script.

Pls advise.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

To run a shell script in remote server from windows batch file

Hi all, i need to run a shell script on remote server. I have created file .bat file in windows server with following code, c:\Users\Desktop\putty.exe -ssh -pw password user@server ./script.sh i need to run the script.sh in my remote server Above command is not working, any... (4 Replies)
Discussion started by: rammm
4 Replies

2. UNIX for Dummies Questions & Answers

Script to check for file size and then sftp

noted down (44 Replies)
Discussion started by: mirwasim
44 Replies

3. Shell Programming and Scripting

Windows Batch script for Unix commands

I wish to create a folder on a unix server B from my windows box using windows batch script. Below is my windows batch script. @ ECHO OFF ::Enter your Directory name: echo Enter your Directory name: set /p mydir= plink user1@ServerA mkdir %mydir% At plink command i get logged... (7 Replies)
Discussion started by: mohtashims
7 Replies

4. Windows & DOS: Issues & Discussions

Gawk Script in Windows batch file - Help

Good morning all. I have been running into a problem running a simple gawk script that selects every third line from an input file and writes it to an output file. gawk "NR%3==0" FileIn > FileOut I am attempting to run this command from a batch file at the command line. I have several hundred... (6 Replies)
Discussion started by: 10000springs
6 Replies

5. Shell Programming and Scripting

Script to check file system size

Dears, the output of this command df -h | tr -s ' ' | cut -f5 -d' ' is capacity 24% 0% 0% 0% 0% 1% 0% 24% 24% 0% 93% 1% (4 Replies)
Discussion started by: xxmasrawy
4 Replies

6. Shell Programming and Scripting

Perl Script to check file date and size

Hi guys, i am new to perl. I started reading the perl documents and try to come up with some logic. I am trying to create a script that would go into a location, search for todays files, then searches for all .txt files from today. If todays not found, its an error If file size is less... (26 Replies)
Discussion started by: DallasT
26 Replies

7. Shell Programming and Scripting

Change the Windows Batch script to UNIX shell script.

Hi, When I run the below script in UNIX it's throwing syntax errors. Actually it's a windows batch script. Could anyone change the below Windows Batch script to UNIX shell script... Script: REM :: File Name : Refresh_OTL.bat REM :: Parameters : %1 - Region REM :: : %2 - Cube Type REM ::... (5 Replies)
Discussion started by: tomailraj
5 Replies

8. Shell Programming and Scripting

shell script to check file size greater than 50M

Hi All, OS:AIX 64 bits using korn shell. Requirement: shell script to check file size greater than 50M and send mail alert. Thanks for your time! Regards, (3 Replies)
Discussion started by: a1_win
3 Replies

9. Shell Programming and Scripting

unix script to check whether particular file exists and to find its size

I want to find the size of particular file exists in a particular directory and i wnt to zip it. In the below mentioned code it should check the MQ.log in the particular directory.Please correct my code so that it will check for particular MQ.log but i could not able to check whether the... (9 Replies)
Discussion started by: Balachandar
9 Replies

10. Shell Programming and Scripting

how to convert unix .ksh script to windows .batch script

I am using awk in my .ksh script but when I am trying to run in windows its not recognising awk part of the ksh script , even when I changed it to gawk it does not work, this is how my .ksh and .bat files look like. thanx. #!/bin/ksh egrep -v "Rpt 038|PM$|Parameters:|Begin |Date: |End... (1 Reply)
Discussion started by: 2.5lt V8
1 Replies
Login or Register to Ask a Question
MONGOWRITEBATCH(3)							 1							MONGOWRITEBATCH(3)

The MongoWriteBatch class

INTRODUCTION
MongoWriteBatch is the base class for the MongoInsertBatch, MongoUpdateBatch and MongoDeleteBatch classes. MongoWriteBatch allows you to "batch up" multiple operations (of same type) and shipping them all to MongoDB at the same time. This can be especially useful when operating on many documents at the same time to reduce roundtrips. Prior to version 1.5.0 of the driver it was possible to use MongoCollection::batchInsert, however, as of 1.5.0 that method is now discour- aged. Note: This class is only available when talking to MongoDB 2.6.0 (and later) servers. It will throw MongoProtocolException if attempting to use it on older MongoDB servers. CLASS SYNOPSIS
MongoWriteBatch MongoWriteBatch Constants o const int$MongoWriteBatch::COMMAND_INSERT1 o const int$MongoWriteBatch::COMMAND_UPDATE2 o const int$MongoWriteBatch::COMMAND_DELETE3 Methods o protected MongoWriteBatch::__construct (MongoCollection $collection, [string $batch_type], [array $write_options]) o public bool MongoWriteBatch::add (array $item) o finalpublic array MongoWriteBatch::execute (array $write_options) MONGOWRITEBATCH TYPES
o MongoWriteBatch::COMMAND_INSERT -Create an Insert Write Batch o MongoWriteBatch::COMMAND_UPDATE -Create an Update Write Batch o MongoWriteBatch::COMMAND_DELETE -Create an Delete Write Batch DESCRIPTION
When executing a batch, by calling MongoWriteBatch::execute, MongoWriteBatch will send over maxWriteBatchSize (defaults to 1000) documents or up to maxBsonObjectSize (defaults to 16777216 bytes), whichever comes first. Note Documents will never be partially transferred. When adding documents to the batch, that overflows the limit, a new batch will be created and the document put into the new batch. ERRORS
/EXCEPTIONS oException on parameter parsing failures oException on argument validation errors (e.g. missing keys) oMongoProtocolException when talking to MongoDB server older then 2.6.0. oMongoProtocolException on socket errors. oMongoWriteConcernException when a write fails due to WriteConcerns EXAMPLES
Example #1 MongoWriteBatch example Adding documents to a Insert batch and then execute it <?php $mc = new MongoClient("localhost"); $collection = $mc->selectCollection("test", "test"); $docs = array(); $docs[] = array("my" => "demo"); $docs[] = array("is" => "working"); $docs[] = array("pretty" => "well"); $batch = new MongoInsertBatch($collection); foreach($docs as $document) { $batch->add($document); } $retval = $batch->execute(array("w" => 1)); var_dump($retval); ?> The above example will output: array(2) { ["nInserted"]=> int(3) ["ok"]=> bool(true) } PHP Documentation Group MONGOWRITEBATCH(3)