Formatting pen drive using command prompt in Windows operating system is a super easy task and it takes only a few seconds.
1. At first, connect Pen Drive to your Computer.
2. check the letter assigned to the USB flash drive (whether it's J: or G: or H:)
3. press Win + R keys to open the Run dialog box and type cmd then press Enter
4. After the press, type format /q /x H: (here, the letter "H" is the drive name. so please, replace the letter "H" with your drive name) command in command prompt and press Enter.
5. Now, It will display a message, so gain press Enter.