Git Product home page Git Product logo

windows-basic-commands-batchscript's Introduction

[

EX08 Windows-basic-commands-batchscript

NAME: JIDHESH P

RESIGTER NO: 212223040078

AIM:

To execute Windows basic commands and batch scripting

DESIGN STEPS:

Step 1:

Navigate to any Windows environment installed on the system or installed inside a virtual environment like virtual box/vmware

Step 2:

Write the Windows commands / batch file Save each script in a file with a .bat extension. Ensure you have the necessary permissions to perform the operations. Adapt paths as needed based on your system configuration.

Step 3:

Execute the necessary commands/batch file for the desired output.

WINDOWS COMMANDS:

Exercise 1: Basic Directory and File Operations

Create a directory named "MyLab" on the desktop.

COMMAND AND OUTPUT:

mkdir %userprofile%\Desktop\MyLab

Screenshot 2024-05-11 222652

Change to the "MyLab" directory and create an empty text file named "MyFile.txt" inside it.

COMMAND AND OUTPUT:

cd %userprofile%\Desktop\MyLab

Screenshot 2024-05-11 222731

type nul > MyFile.txt

Screenshot 2024-05-11 222758

List the contents of the "MyLab" directory.

COMMAND AND OUTPUT:

dir %userprofile%\Desktop\MyLab

Screenshot 2024-05-11 222821

Copy "MyFile.txt" to a new folder named "Backup" on the desktop.

COMMAND AND OUTPUT:

mkdir %userprofile%\Desktop\Backup

Screenshot 2024-05-11 222837

copy MyFile.txt %userprofile%\Desktop\Backup

Screenshot 2024-05-11 222854

Move the "MyLab" directory to the "Documents" folder.

COMMAND AND OUTPUT:

mkdir %userprofile%\Desktop\Documents

move MyLab Documents

Screenshot 2024-05-11 222922

Exercise 2: Advanced Batch Scripting

Create a batch script named "BackupScript.bat" that creates a backup of files with the ".docx" extension from the "Documents" folder to a new folder named "DocBackup" on the desktop.

COMMAND:

@echo off mkdir %userprofile%\Desktop\DocBackup copy %userprofile%\Documents*.docx %userprofile%\Desktop\DocBackup echo Backup completed successfully!

OUTPUT:

Screenshot 2024-05-11 222937

COMMAND:

@echo off mkdir %userprofile%\Desktop\DocBackup copy %userprofile%\Documents*.docx %userprofile%\Desktop\DocBackup del %userprofile%\Documents*.docx echo Backup and deletion completed successfully!

OUTPUT:

Screenshot 2024-05-11 223010

RESULT:

The commands/batch files are executed successfully. ](https://github.com/JIDHESHP/Linux-File-IO-Systems-locking.git)

windows-basic-commands-batchscript's People

Contributors

gowriganeshns avatar jidheshp 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.