How to Create Monthly Folders Using a Batch Script

Create Monthly Folders Using Batch Script

How to Create Monthly Folders Using a Batch Script

Do you often find yourself manually creating folders for each month of the year? Why not automate this process with a simple batch script? In this tutorial, I'll show you how to create a batch script that generates 12 monthly folders with customized names. You can use this for organizing reports, projects, or any recurring tasks.

Key Features of the Script

  • Customizable Prefix: You can specify the prefix (e.g., "Bulk Report").
  • Customizable Suffix: You can specify the suffix (e.g., "2025").
  • Month Format Options: Choose between short (Jan, Feb) or full (January, February) month names.

The Batch Code

@echo off
setlocal enabledelayedexpansion

:: Ask for prefix, suffix, and month format
set /p prefix="Enter the prefix (e.g., Bulk Report): "
set /p suffix="Enter the suffix (e.g., 2025): "
set /p month_format="Enter month format (short or full): "

:: Define month names
set "months_short=Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec"
set "months_full=January February March April May June July August September October November December"

:: Validate month format
if /i "%month_format%" equ "short" (
    set "months=!months_short!"
) else if /i "%month_format%" equ "full" (
    set "months=!months_full!"
) else (
    echo Invalid month format. Please use "short" or "full".
    exit /b
)

:: Create folders
set count=1
for %%m in (!months!) do (
    set folder_name="%prefix% !count! %%m-%suffix%"
    echo Creating folder: !folder_name!
    mkdir !folder_name!
    set /a count+=1
)

echo All folders have been created.
pause
    

Step-by-Step Instructions

1. Open Notepad

  1. Press Windows + R, type notepad, and hit Enter.
  2. Copy and paste the above code into Notepad.

2. Save the Script

  1. Click File > Save As.
  2. Set the file type to All Files.
  3. Save the file with a .bat extension, like CreateMonthlyFolders.bat.

3. Run the Script

  1. Double-click the .bat file.
  2. Enter the required inputs when prompted (prefix, suffix, and month format).
  3. The script will automatically create folders in the same directory as the .bat file.

Interactive Button for Copying Code

Conclusion

This batch script is a handy tool to automate folder creation and save time. It’s perfect for organizing projects, reports, or other tasks that require a monthly folder structure. Try it out and let me know how it works for you!

Automate Your Flask Project Setup with This Simple Batch Script

Code Snippet with Copy Button

@echo off
:: Display welcome message in green using PowerShell
powershell -command "Write-Host 'Welcome to Ripon Sarkar Portfolio' -ForegroundColor Green"
powershell -command "Write-Host 'by this tool you can create a standard level flask project structure' -ForegroundColor Cyan"
powershell -command "Write-Host 'Happy Coding :)' -ForegroundColor Yellow"

echo ---------------------------------------------------------------------

:: Prompt the user to enter the project name
set /p projectName="Enter the Flask project name: "

:: Create main project folder
mkdir %projectName%
cd %projectName%

:: Create Flask folders
mkdir app
mkdir app\static
mkdir app\static\css
mkdir app\static\js
mkdir app\static\images
mkdir app\templates
mkdir app\files

:: Create basic HTML file
echo ^<!DOCTYPE html^> > app\templates\index.html
echo ^<html lang="en"^> >> app\templates\index.html
echo ^<head^> >> app\templates\index.html
echo    ^<meta charset="UTF-8"^> >> app\templates\index.html
echo    ^<meta name="viewport" content="width=device-width, initial-scale=1.0"^> >> app\templates\index.html
echo    ^<title^>Flask Project^</title^> >> app\templates\index.html
echo    ^<link rel="stylesheet" href="^^{{ url_for('static', filename='css/style.css') ^^}}"^> >> app\templates\index.html
echo ^</head^> >> app\templates\index.html
echo ^<body^> >> app\templates\index.html
echo    ^<h1^>Welcome to %projectName%^</h1^> >> app\templates\index.html
echo    ^<script src="^^{{ url_for('static', filename='js/script.js') ^^}}"^>^</script^> >> app\templates\index.html
echo ^</body^> >> app\templates\index.html
echo ^</html^> >> app\templates\index.html


:: Create basic CSS file
echo /* Basic styling */ > app\static\css\style.css
echo body { >> app\static\css\style.css
echo    font-family: Arial, sans-serif; >> app\static\css\style.css
echo    background-color: #f4f4f4; >> app\static\css\style.css
echo    color: #333; >> app\static\css\style.css
echo } >> app\static\css\style.css

:: Create basic JS file
echo // Basic JavaScript file > app\static\js\script.js
echo console.log("JavaScript is connected!"); >> app\static\js\script.js

:: Create a basic Flask app file
echo from flask import Flask, render_template > app\__init__.py
echo. >> app\__init__.py
echo app = Flask(__name__) >> app\__init__.py
echo. >> app\__init__.py
echo @app.route("/") >> app\__init__.py
echo def home(): >> app\__init__.py
echo     return render_template("index.html") >> app\__init__.py
echo. >> app\__init__.py
echo if __name__ == "__main__": >> app\__init__.py
echo     app.run(debug=True) >> app\__init__.py

:: Create run script
echo from app import app > run.py

:: Create placeholder data file
echo Data placeholder > app\files\data.txt

:: Create requirements.txt file
echo flask > requirements.txt

:: Create readme.txt file with VSCode instructions
echo Instruction for VSCode Editor User > readme.txt
echo. >> readme.txt
echo 1. Select Project folder and open in VSCode Editor >> readme.txt
echo. >> readme.txt
echo 2. Open New Terminal >> readme.txt
echo. >> readme.txt
echo Create Virtual Environment for run Python. >> readme.txt
echo     python -m venv venv (hit Enter on keyboard) >> readme.txt
echo. >> readme.txt
echo     # you get a prompt down-right side of the vscode editor >> readme.txt
echo     # We noticed a new environment has been created. Do you want to select it for the workspace folder >> readme.txt
echo     # click on Yes button. >> readme.txt
echo. >> readme.txt
echo Set Execution Policy >> readme.txt
echo     Set-ExecutionPolicy -Scope Process -ExecutionPolicy RemoteSigned (hit Enter on keyboard) >> readme.txt
echo. >> readme.txt
echo Activate Virtual Environment >> readme.txt
echo     .\venv\Scripts\Activate (hit Enter on keyboard) >> readme.txt
echo. >> readme.txt
echo     # after this command you can see in terminal (venv) is in green color, means it activated. >> readme.txt
echo. >> readme.txt
echo Install Required Packages >> readme.txt
echo     pip install -r requirements.txt >> readme.txt

echo Project structure for %projectName% created successfully!
pause




    

Different Type of Cement Details

 Different Type of Cement Details

Ordinary Portland Cement :    BDS EN 197-1:2010 CEM I, 52.5 N

Portland Composite Cement :     BDS EN 197-1:2010 CEM II / A - M(S-V-L),42.5N  

Portland Composite Cement :    BDS EN 197-1:2010 CEM II / A - M(S-V-L),42.5N 

Cement Bags Details

 

Cement Bags
Department : Production (Packing) Date : 14.08.2024








1 2 Ply BM (Normal) Length -730 mm

730*435*85 Width - 435 mm


Gusset-85 mm




2 2 Ply AM (Special) Length -725 mm

725*435*85 Width - 435 mm


Gusset- 85 mm

ইনভার্টার ও নন ইনভার্টার এসির বিদ্যুৎ খরচ বৃত্তান্ত

 আমরা এসি সাধারণত ২ ধরনের দেখতে পাই,

১. ইনভার্টার এসি।

২. নন-ইনভার্টার এসি।


ইনভার্টার এসির কথা বলার আগে নন- ইনভার্টার এসির কথা বলি। কারন, নন- ইনভার্টার এসি আমরা আগে থেকে ব্যবহার করছি যা প্রচলিত টেকনোলোজিতে তৈরি। এ ধরনের এসিতে রোটারি কম্প্রেসার থাকে।

অপরদিকে ইনভার্টার এসি আজ থেকে প্রায় ৭-৮ বছর আগে আসা শুরু হয়েছে। এই এসির দাম নন- ইনভার্টার এসির তুলনায় অনেক বেশি। এটি dc কারেন্টে চলে। বর্তমানে ইনভার্টার এসির দাম অনেকাংশে কম হয়ে গিয়েছে। তবু ভাল মানের ইনভার্টার এসি,নন- ইনভার্টার এসির তুলনায় এখনো  প্রায় ৫০ % দাম বেশি।[LG,General]


এখন আমরা এই দুই ধরনের এসি সম্পর্কে একটু গভীর  ভাবে জানব। বলব এগুলো কিভাবে চলে।


১. নন- ইনভার্টার এসি:- এ ধরনের এসি বেশি কারেন্ট

Backup of MCQ44 and organized

MCQ Quiz Test

MCQ HSC-Biology-Botany-Chapter1-Cell-and-its-Structure

Features :
  1. Quiz Start Button

  2. Question randomly Change

  3. External Qiestion Bank

  4. Note, features added, which removed after start the quiz.

  5. import question and answer from extarnal json file activated,

  6. questin limit 3 activated,

  7. question shuffling activated

  8. submit button disable after one click activated

Limitation:
  1. Next Button

  2. Previous Button

  3. Finish Button after every question

  4. Need fixed Space for the every button.

Result Type:
You scored 0 out of 3.
1 unanswered,
2 wrong.

Answer Type:
Question 1: What is the function of a cell membrane?
Correct answer: Providing necessary energy and strength
Your answer: Keeping cells together
Question 2: What is the main component of a cell wall?
Correct answer: Chitin
Your answer: Cellulose
Question 3: What is the term for the semifluid substance inside cells?
Correct answer: Not answered
Your answer: Cytoplasm

Read in bangla solaimanlipi font

Bangla Text in SutonnyMJ Font

নিচের কোনটি কোষপ্রাচীরের কাজ?

MCQ22

Features :
  1. Quiz Start Button

  2. Next Button

  3. Previous Button

  4. Finish Button after every question

  5. Note, features added, which removed after start the quiz.

  6. import question and answer from extarnal json file activated,

  7. questin limit 3 activated,

  8. question shuffling activated

  9. submit button disable after one click activated

Limitation:
  1. Question Not randomly Change

  2. All Questions in this code make verbose

  3. Need fixed Space for the every button.

Result Type:
You scored 0 out of 3.
1 unanswered,
2 wrong.

Answer Type:
Question 1: What is the function of a cell membrane?
Correct answer: Providing necessary energy and strength
Your answer: Keeping cells together
Question 2: What is the main component of a cell wall?
Correct answer: Chitin
Your answer: Cellulose
Question 3: What is the term for the semifluid substance inside cells?
Correct answer: Not answered
Your answer: Cytoplasm

MCQ21 show correct answer , question, correct answer

MCQ20

MCQ19

Quiz by Ripon Sarkar


Features :
1. Quiz Start Button
2. Next Button
3. Previous Button
4. Finish Button after every question
5. Note, features added, which removed after start the quiz.

Result Type:
You scored 0 out of 3.
1 unanswered,
2 wrong.

Answer Type:
Question 1: What is the function of a cell membrane?
Correct answer: Providing necessary energy and strength
Your answer: Keeping cells together
Question 2: What is the main component of a cell wall?
Correct answer: Chitin
Your answer: Cellulose
Question 3: What is the term for the semifluid substance inside cells?
Correct answer: Not answered
Your answer: Cytoplasm

Limitation:
1. Question Not randomly Change
2. All Questions in this code make verbose
3. Need fixed Space for the every button.