Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

How to hide "Unrecognized Command" in batch?


  • Please log in to reply
2 replies to this topic

#1 Ivann700

Ivann700

  • Members
  • 50 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Slanec, Kosice-okolie, Slovakia
  • Local time:03:44 PM

Posted 15 February 2018 - 11:18 AM

Hello. Im making custom commands in my batch file. I use this code:

if "%cmd%"=="chelp" (
   rem Ima not give you my code...
)
    
goto cmd
 

 

If i type chelp for an instance, it gives me this:

 

https://imgur.com/r3726CA

(imgur due to this dumb "You are not allowed to use this image extension" error)

 

Is there any way around this? Also without bundling batch files with this.


Bananas never lose...
 



OS: Windows 7 Ultimate x64, AntiVirus: ESET NOD32, Firewall: Nothing lol, PC: Fujitsu Esprimo P5731, CPU: Intel Core 2 Duo E7500
Mobo: Fujitsu D3011-A1, RAM: DDR3 4GB @ 666 MHz (But really), Storage: Seagate Barracuda 80 GB 7K RPM SATA II + WD Blue 1 TB SATA III
GPU: nVidia GT710 2 GB @ 1251 MHz, Sound: That ricer, stuff, PSU: 300W OEM, Case: Fujitsu P5731


BC AdBot (Login to Remove)

 


#2 bwv848

bwv848

    Bleepin' Owl


  • BSOD Kernel Dump Expert
  • 3,024 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:92.96 million miles away from the sun
  • Local time:09:44 AM

Posted 15 February 2018 - 12:47 PM

Not sure if I am understanding you correctly, but anyway, to suppress the output of a command use the NUL command...

 

https://ss64.com/nt/nul.html


If I do not reply in three days, please message me.
 
BC BSOD Posting Instructions | Carrona BSOD Index | Driver Reference Table (DRT)


#3 Ivann700

Ivann700
  • Topic Starter

  • Members
  • 50 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Slanec, Kosice-okolie, Slovakia
  • Local time:03:44 PM

Posted 15 February 2018 - 12:55 PM

Maybe, but im not sure how to apply this. I want to hide that error when i use a custom command


Bananas never lose...
 



OS: Windows 7 Ultimate x64, AntiVirus: ESET NOD32, Firewall: Nothing lol, PC: Fujitsu Esprimo P5731, CPU: Intel Core 2 Duo E7500
Mobo: Fujitsu D3011-A1, RAM: DDR3 4GB @ 666 MHz (But really), Storage: Seagate Barracuda 80 GB 7K RPM SATA II + WD Blue 1 TB SATA III
GPU: nVidia GT710 2 GB @ 1251 MHz, Sound: That ricer, stuff, PSU: 300W OEM, Case: Fujitsu P5731





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users