Coder Social home page Coder Social logo

jeff-lewis / batchfunctionlibrary Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ritchielawrence/batchfunctionlibrary

0.0 2.0 0.0 80 KB

Library of Windows batch functions

Home Page: https://ritchielawrence.github.io/batchfunctionlibrary/

HTML 99.46% CSS 0.54%

batchfunctionlibrary's Introduction

Table of Contents

About

This web based library was created in 2002 and featured a collection of date and time conversion functions. Later additions includes file, network and system functions. The library is no longer developed and is now archived on Github. Note, the webpages were designed for display in a treeview which itself was written in PHP/Javascript. The treeview code has largely been removed. Some of the internal hyperlinks might be broken, but you should have little trouble finding the target page. Happy batching!

Usage

Download and extract the archive, open the page of interest in a browser. Copy and paste the function to use in a batch file.

Library Contents

Tutorials

Title Description
Batch Function Overview What are they, why use them, and what do they look like?
Using the Functions How to use the functions, with examples.
Batch Functions Explained Detailed examination of batch functions.
Reading Files How to read lines from any position in a file.

Date and Time Functions

Function Description
DateToDays Converts a calendar date to the number of days elapsed since 1970-01-01
DateToDOW Returns the day of week number for a given calendar date
DateToMins Converts a calendar date to the number of minutes elapsed since 1970-01-01 00:00
DateToMJD Converts a UTC date to a Modified Julian Day
DateToOrdinal Returns an ordinal date from a calendar date as described by ISO 8601
DateToSecs Converts a calendar date to the number of seconds elapsed since 1970-01-01 00:00:00
DateToWeek Returns an ISO 8601 Week date from a calendar date
DayName Returns the name of the day of week from the day of week number
DayNumber Returns the number of the day of week from the day of week name
DaysToDate Converts the number of days elapsed since 1970-01-01 to a calendar date
GetDate Returns the local system date
GetTime Returns the local system time
MinsToDate Converts the number of minutes elapsed since 1970-01-01 00:00 to a calendar date and time
MJDToDate Converts a Modified Julian Day to a UTC date
MonthName Returns the name of month from the month number
MonthNumber Returns the number of month from a month name
OrdinalToDate Returns a calendar date from an ISO 8601 Ordinal date
SecsToDate Converts the number of seconds elapsed since 1970-01-01 00:00:00 to a calendar date and time
WeekToDate Returns a calendar date from an ISO 8601 Week date

File and Directory Functions

Function Description
FileSizeComp Compares the size of a specified file
GetDirStats Returns the number of files, subdirectories and total size of a specified directory
IsDirEmpty Determines if the specified directory is empty
IsInPath Determines if the specified files are in the current directory or in a directory listed in the path statement

Network Functions

Function Description
GetDG Returns the default gateway
GetIP Returns the IP address of the primary adapter
GetMAC Returns the MAC address of the primary adapter
GetNA Returns the network address of the primary adapter
GetSM Returns the subnet mask of the primary adapter

System Functions

Function Description
GetOS Returns the operating system version
IsRunning Determines if the specified service is running
Sleep Suspends execution of the current batch file for a specified interval
Timer Returns the number of elapsed seconds since the function was last called and first called
Uptime Returns the elapsed days, hours, minutes and seconds since the system booted

Revisions

Revision Date Changes
1.0 2016-06-18 The webpages that make up the library have been removed from www.commandline.co.uk and archived at Github.

Copyright and License

Code and documentation copyright 2002-2016 Ritchie Lawrence. Code released under MIT License

batchfunctionlibrary's People

Contributors

ritchielawrence avatar

Watchers

Jeff Lewis avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.