Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

At the CMD prompt, creating an empty file is as easy as:

COPY NUL A

        1 file(s) copied.
DIR A

07/25/2017 12:12 AM 0 a

               1 File(s)              0 bytes


I'm pretty sure that date could be 1982 and your example would work equally well. :-)

Checks... Yup: https://blogs.msdn.microsoft.com/oldnewthing/20031022-00/?p=...


Ha ha, good one. Yes, it wasn't meant to show anything new, just put it because I've seen many people don't know this sort of stuff - basic command line usage.

Edit: Actually, I had originally meant to write "At the DOS/CMD prompt", but left out the DOS part because who knows how many people even know what DOS is these days ... :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: