DEV Community

Cover image for Delete JavaScript projects like a pro 🔥
Andronik Nazaryan
Andronik Nazaryan

Posted on

1

Delete JavaScript projects like a pro 🔥

Works only on Windows

  1. create new file call it frm.bat (command name can be anything)
  2. open with your favourite code editor and paste the following code
  3. move it into Program Files (x86) to be available for Powershell
@echo off 

if "%~1"=="" (
    echo No parameters have been provided.
    echo ex: frm {file/folder}
) else (
    if exist %1\* (
        echo Removing %1 with recursion please wait...
        cmd "/C rm -r %1 -f"
        echo %1 removed.
    ) else (
        echo {%1} doesn't exist
    )
)
Enter fullscreen mode Exit fullscreen mode

You are done, open Powershell and type

/frm {folder name}

all this simple code does is running native powershell command
rm -r {folder_name} -Force

this is my first post hope it helps ♥

Top comments (0)

The Most Contextual AI Development Assistant

Pieces.app image

Our centralized storage agent works on-device, unifying various developer tools to proactively capture and enrich useful materials, streamline collaboration, and solve complex problems through a contextual understanding of your unique workflow.

👥 Ideal for solo developers, teams, and cross-company projects

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay