Skip to main content

Command Palette

Search for a command to run...

Stop Worrying About Tally Backups: Automate It With This One-Click Script!

Published
3 min read
Stop Worrying About Tally Backups: Automate It With This One-Click Script!
V

With over 9 years of experience as in IT, I have led technology operations across diverse industries, ensuring robust IT infrastructure, network security, and team development.

My expertise spans managing IT infrastructure & operations, IT policy, and backup/disaster recovery. My expertise also includes IT asset management, Google Workspace & Office 365, endpoint security, DLP, and cross-platform systems (Windows/Linux/Mac OS) etc.

Additionally, I hold certifications in Google IT Support, CCNA, and IBM Cybersecurity, reinforcing my commitment to continuous learning and delivering robust technology solutions.

Thank you for your time and consideration.

Best regards, Vishal Mathur

As anyone managing accounts knows, your Tally data is the financial backbone of your business. But let's be honest, how often do we forget the crucial task of taking regular backups? Manual backups are tedious, easy to postpone, and prone to human error. One corrupted file or system failure could mean hours of lost work, or worse, a catastrophic loss of financial records.

What if you could secure your valuable Tally data with a single click, ensuring you always have a safe, organized, and up-to-date copy?

I've put together a simple but powerful Windows command script that does exactly that. No expensive software needed—just a few lines of code.

What This "One-Click" Script Does for You:

  • Automated & Organized: Every time you run it, the script creates a new backup folder automatically named with the exact date and time (e.g., 12-SEP-2025-13-09-12-TALLY). This gives you a perfect, chronological archive.

  • Robust Copying: It uses robocopy, a reliable Windows tool, to ensure all your data and sub-folders are copied accurately without any corruption.

  • Instant Confirmation: You get a simple pop-up notification on your screen telling you whether the backup was a success or if it failed, so you're never left guessing.

  • Peace of Mind: Set it up once, and enjoy the confidence of knowing your data is safe. You can even run it at the end of each workday with a simple double-click.

How to Set It Up in 2 Minutes

You don't need to be a tech expert. Just follow these simple steps:

  1. Copy the Code: Copy the entire script below.

  2. Paste into Notepad: Open Notepad, paste the code in.

  3. IMPORTANT - Edit Paths: Change the SOURCE and DEST_ROOT paths to match your computer.

    • SOURCE: The folder where your Tally data is currently stored.

    • DEST_ROOT: The main folder where you want all your backups to be saved (e.g., on a separate drive or cloud-synced folder).

  4. Save the File: Click File > Save As. Change "Save as type" to "All Files" and name the file run-for-backup.cmd.

  5. Run It: That's it! Just double-click the run-for-backup.cmd file on your desktop anytime you want to create a fresh backup.

The Script

@echo off
setlocal enabledelayedexpansion
title Tally Backup

REM =======================
REM EDIT THESE TWO PATHS
REM =======================
set "SOURCE=C:\Desktop\Tally-data"
set "DEST_ROOT=C:\Desktop\tally-data-backup"

REM ===== Build timestamp folder name like 12-SEP-2025-13-09-12-TALLY =====
for /f "usebackq delims=" %%I in (`powershell -NoProfile -Command "(Get-Date).ToString('dd-MMM-yyyy-HH-mm-ss').ToUpper()"`) do set "STAMP=%%I"
set "BACKUP_DIR=%DEST_ROOT%\%STAMP%-TALLY"

REM Create destination folder
if not exist "%BACKUP_DIR%" mkdir "%BACKUP_DIR%"

REM ===== Notify start =====
REM ===== POPUP ===== powershell -NoProfile -Command "$wshell=New-Object -ComObject WScript.Shell; REM ====== $wshell.Popup('Tally backup in progress',3,'Backup',0x40)" >nul

echo Backing up from: "%SOURCE%"
echo To:             "%BACKUP_DIR%"
echo.

REM ===== Copy files (keeps dates & attributes) and log the run =====
set "LOGFILE=%BACKUP_DIR%\backup.log"
robocopy "%SOURCE%" "%BACKUP_DIR%" /E /COPY:DAT /R:2 /W:2 /MT:8 /DCOPY:T /FFT ^
  /LOG+:"%LOGFILE%" /NFL /NDL /NP /NJH /NJS
set "RC=%ERRORLEVEL%"

REM ===== Show result =====
if %RC% GEQ 8 (
  echo Backup FAILED with code %RC%. See log: "%LOGFILE%"
  powershell -NoProfile -Command "$wshell=New-Object -ComObject WScript.Shell; $wshell.Popup('Backup FAILED. Code: %RC%. Check log at %LOGFILE%',0,'Backup',0x10)" >nul
  exit /b %RC%
) else (
  echo Backup completed successfully: "%BACKUP_DIR%"
  powershell -NoProfile -Command "$wshell=New-Object -ComObject WScript.Shell; $wshell.Popup('Backup completed',0,'Backup',0x40)" >nul
  exit /b 0
)

Stop leaving your financial data to chance. Take two minutes to set up this script and make data protection an effortless part of your daily routine.

#Tally #DataBackup #Automation #Accounting #SmallBusiness #Productivity #TechTips #Windows #CMD

More from this blog

What Are Tokens — And Why Should You Care?

The hidden unit of measurement that shapes every conversation you have with Claude. You type a message to Claude. You hit send. A response flows back in seconds. Simple, right? But beneath that seamless exchange, something interesting is happening — your words are being sliced into tiny linguistic units called tokens before Claude ever "reads" them. Tokens are the atomic unit of language for large language models. They're not characters, and they're not always full words. They sit somewhere in between — and understanding them unlocks a clearer picture of how AI language models actually work, why they have limits, and how to work with those limits instead of against them. So what exactly is a token? Think of tokenisation as breaking text into the most useful chunks for a model to learn from. Common words like "the" or "and" are usually one token. Longer or rarer words might get split into two or three pieces. Punctuation, spaces, and newlines all count too. Example — how this sentence gets tokenised Claude under stands language through tok en isation . As a rough rule of thumb: 100 tokens is about 75 words, or a short paragraph. A typical novel runs around 100,000 words — that's roughly 133,000 tokens. Claude's extended context window can hold the equivalent of several books at once. The context window: Claude's working memory Every conversation with Claude happens inside a context window — a fixed-size buffer that holds everything Claude can "see" at once. This includes your entire conversation history, any documents you paste in, system instructions, and Claude's own responses. Once the window fills up, older content scrolls out of view. Claude doesn't forget it in the human sense — it simply can't read past what fits. This is why very long conversations can occasionally feel like Claude loses track of something said much earlier.

May 20, 20263 min read
What Are Tokens — And Why Should You Care?
V

Vishal Mathur - IT Consultant and AI Prompt Engineer

31 posts

With over 9 years of experience as in IT, I have led technology operations across diverse industries, ensuring robust IT infrastructure, network security, and team development.

Stop Worrying About Tally Backups: Automate It