Change Is Inevitable
  • Home
  • MySQL
    • MySQL-Articles
    • AWS RDS
    • Percona Xtradb Cluster
    • MariaDB
    • Galera Cluster
    • ProxySQL
    • MySQL-Scripts
    • MySQL tools
    • MySQL Resources
  • Tools
    • MySQL Advisor
    • MySQL Random Data Generator
    • Postgresql Random Data Generator
    • Clean Prompt
  • General
    • binary-to-decimal
    • Fermat’s Theorem
    • Review
    • Just for fun
    • Personal
  • Contact Me
    • Copyright
    • MySQL Podcast (Youtube)
    • MySQL Podcast (Spotify)
Recent Posts
  • MySQL INSTANT DDL breaks EXCHANGE PARTITION
  • How to setup and use Percona Binlog Server (PBS)
  • MySQL Major Version Upgrade Checklist – how to
  • InnoDB Flushing is simple – explained
  • MySQL Tools for Performance Tuning and Test Data Generation
Recent Comments
  • Kedar on MySQL INSTANT DDL breaks EXCHANGE PARTITION
  • Jean-François Gagné on MySQL INSTANT DDL breaks EXCHANGE PARTITION
  • Reggie on A Unique Foreign Key issue in MySQL 8.4
  • Kedar on How to fix write latency in MySQL 8.4 Upgrade
  • Kedar on How to fix write latency in MySQL 8.4 Upgrade
Home » Kedar » Page 29
Change Is Inevitable

Kedar Vaijanapurkar's Blog for MySQL, technology and various subjects

  • Home
  • MySQL
    • MySQL-Articles
    • AWS RDS
    • Percona Xtradb Cluster
    • MariaDB
    • Galera Cluster
    • ProxySQL
    • MySQL-Scripts
    • MySQL tools
    • MySQL Resources
  • Tools
    • MySQL Advisor
    • MySQL Random Data Generator
    • Postgresql Random Data Generator
    • Clean Prompt
  • General
    • binary-to-decimal
    • Fermat’s Theorem
    • Review
    • Just for fun
    • Personal
  • Contact Me
    • Copyright
    • MySQL Podcast (Youtube)
    • MySQL Podcast (Spotify)

Kedar

204 posts

MySQL Stored procedure – Split Delimited string into Rows

  • Kedar
  • December 5, 2009
This procedure will split  a “;” separated column in to new fields preserving ids. This is very specific problem, lets check it with example. Consider a sample table test: And…
View Post

MySQL Stored procedure – Execute query if table or Column exists

  • Kedar
  • December 5, 2009
Well procedures mainly carried out working with information schema and it’s usage in stored procedure. Procedures are fairly simple and easy to understand. 1. Edit_table – following procedure executes queries to…
View Post

How to echo colored text in linux shell script

  • Kedar
  • December 4, 2009
Having a colourful display on shell script is something that’d beautify your experience. Using colour text and echos will help you to highlight and distinguish the shell output on a…
View Post

MySQL master master replication monitor with php code

  • Kedar
  • December 4, 2009
For monitoring replication we know a lot of tools and codes – but this one is different because I wrote it 😉 Well this is fairly simple php code for…
View Post

Using VLookup like Batch script to compare two excel / csv

  • Kedar
  • November 24, 2009
Using Vlookup: I have two csv files; File1 has Id and Value Columns and File2 has Id. Problem: I need to compare both files and put respective values to File2…
View Post

bat – batch file to create formatted date time (ddmmyyyy) directory

  • Kedar
  • November 18, 2009
In batch scripting, generating file and directory names with current date and time stamps can greatly enhance organization and workflow. This tutorial will walk you through various code snippets and…
View Post

Posts pagination

Previous 1 … 28 29 30 … 34 Next
MySQL Podcast (Youtube)
RSS feed: MySQL Podcast (Spotify) MySQL Podcast (Spotify)
  • MySQL Major Version Upgrade Checklist (Zero Downtime Strategy)
    Upgrading MySQL major versions in production is never just a version bump - it’s a carefully planned process involving compatibility checks, replication strategy, testing, and controlled cut-over.In this episode, we walk through a practical MySQL Major Version Upgrade Checklist based on real-world DBA workflows. We are covering MySQL replication as base setup for upgrade. It […]
Search:
... ...
  • MySQL INSTANT DDL breaks EXCHANGE PARTITION
  • How to setup and use Percona Binlog Server (PBS)
  • MySQL Major Version Upgrade Checklist – how to
  • InnoDB Flushing is simple – explained
  • MySQL Tools for Performance Tuning and Test Data Generation

4 responses to “bat – batch file to create formatted date time (ddmmyyyy) directory”

  1. Saiful Avatar
    Saiful
    January 16, 2018

    Day Month Year Time
    dd/mm/yr hh:mm batch file

    Reply
  2. Swarup Dash Avatar
    Swarup Dash
    January 3, 2018

    Hello, I need to develop an batch file where in it will read all the dates (in dd/mm/yy format) and give me output based upon different month.

    Input : Excel File (With multiple sheets)
    Output: Excel (Preferred)

    For a quick start we can start with single sheet, and may be a workbook later.

    Reply
  3. BigMetalHarley Avatar
    BigMetalHarley
    November 24, 2012

    Now, how do I copy files to these newly created folders using the same batch file? Here’s my batch file so far;

    _____________________________________________________

    @echo off
    C:
    CD\
    If exist “c:\Master King Backup\” echo Master King Backup folder already exists
    If not exist “C:\Master King Backup\” echo Creating Directory
    If not exist “C:\Master King Backup\” MD “Master King Backup”
    If not exist “C:\Master King Backup\Backup” MD “C:\Master King Backup\Backup”
    If not exist “C:\Master King Backup\Working” MD “C:\Master King Backup\Working”
    CD\”Master King Backup\Working\”
    for /f “usebackq tokens=1-3” %%a in (`date /t`) do (
    for /f “delims=/ tokens=1-3” %%i in (“%%b”) do (
    for /l %%m in (1,1,50) do (
    if exist %%i-%%j-%%k-%%m (
    rem do nothing
    ) else (
    mkdir %%i-%%j-%%k-%%m
    cd %%i-%%j-%%k-%%m
    goto finis
    )
    )
    )
    )
    :finis
    rem do stuff in our directory here like copy some files
    rem copy c:\temp\*.*
    xcopy /E /C /F /R /Y “C:\Program Files (x86)\HPCSoft\MasterKing32\Database\*.*” “C:\Master King Backup\Working\”
    xcopy /E /C /F /R /Y “C:\Master King Backup\Working\” “\\readyshare\USB_Storage\Master King Backup\working\”
    CD\”Master King Backup\Backup\”
    for /f “usebackq tokens=1-3” %%a in (`date /t`) do (
    for /f “delims=/ tokens=1-3” %%i in (“%%b”) do (
    for /l %%m in (1,1,50) do (
    if exist %%i-%%j-%%k-%%m (
    rem do nothing
    ) else (
    mkdir %%i-%%j-%%k-%%m
    cd %%i-%%j-%%k-%%m
    goto finis
    )
    )
    )
    )
    :finis
    rem do stuff in our directory here like copy some files
    rem copy c:\temp\*.*
    xcopy /E /C /F /R /Y “C:\Program Files (x86)\HPCSoft\MasterKing32\Database\*.*” “C:\Master King Backup\Backup\”
    xcopy /E /C /F /R /Y “C:\Master King Backup\Working\” “\\readyshare\USB_Storage\Master King Backup\Backup\”
    _____________________________________________________

    Here’s what has to happen, when I run the batch file, I need it to create a new directory and name it (them) the current date and time. Next I need to copy some files on the local computer to the newly created directory(s). Can someone help me with this? Thank you so very much.

    Reply
  4. Deepu Mohan Puthrote Avatar
    Deepu Mohan Puthrote
    September 7, 2011

    You may also see this method given in the following location.
    <a href=”http://tips.deepumohan.com/2011/09/windows-batch-script-to-create.html” rel=”nofollow”>Windows batch script for creating directory ddmmyyy</a>

    Reply
Change Is Inevitable
Designed & Developed by Code Supply Co.