{"id":3976,"date":"2026-01-28T06:48:03","date_gmt":"2026-01-28T06:48:03","guid":{"rendered":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/?p=3976"},"modified":"2026-04-08T12:39:13","modified_gmt":"2026-04-08T12:39:13","slug":"create-file-in-windows-cmd","status":"publish","type":"post","link":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/489\/create-file-in-windows-cmd.html","title":{"rendered":"How to Create a File in Command Prompt?"},"content":{"rendered":"<style>\n.blg-advrt-main {\n    width: 100%;\n    max-width: 1000px;   \/* increase overall box width *\/\n    margin: 30px auto;   \/* center it nicely *\/\n}\n\n.blg-prm-bx {\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    gap: 40px;           \/* more spacing between image & text *\/\n    padding: 30px 40px;  \/* increase inner space *\/\n    border-radius: 12px;\n    box-shadow: 0 6px 18px rgba(0,0,0,0.08);\n}\n\n\/* Image *\/\n.blg-prm-bx img {\n    max-width: 320px;   \/* bigger image *\/\n    height: auto;\n}\n\n\/* Content area *\/\n.blg-prm-bx .content {\n    max-width: 550px;\n}\n\n\/* Heading *\/\n.blg-prm-bx h2 {\n    font-size: 26px;\n    margin-bottom: 12px;\n}\n\n\/* Paragraph *\/\n.blg-prm-bx p {\n    font-size: 16px;\n    line-height: 1.6;\n}\n\n\/* Button *\/\n.blg-prm-bx a {\n    display: inline-block;\n    margin-top: 15px;\n    padding: 12px 22px;\n    font-size: 15px;\n    border-radius: 6px;\n}\n<\/style>\n\n<p>Creating files is one of the most basic tasks while working with a computer. While most users rely on folders and right\u2011click options, the Command Prompt (CMD) offers a faster and more powerful way to create and manage files, especially for developers, system administrators, and anyone working on servers.<\/p>\n\n\n\n<p>Using Command Prompt may look intimidating at first, but once you understand a few simple commands, it becomes easy and efficient. In this guide, we will walk you through step\u2011by\u2011step methods to create files using Command Prompt, explained in simple language so even beginners can follow along.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Before You Start<\/strong><\/h2>\n\n\n\n<p>Before creating a file, make sure:<\/p>\n\n\n\n<p>\u2794 You have opened Command Prompt.<\/p>\n\n\n\n<p>\u2794 You are in the correct folder (directory) where you want to create the file.<\/p>\n\n\n<hr>\n\n\n<p><strong>Also Read: <\/strong><a href=\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/487\/check-net-framework-version-in-windows.html\"><strong>How to Check .NET Framework Version in Windows CMD?<\/strong><\/a><\/p>\n\n\n<hr>\n\n\n<h2 class=\"wp-block-heading\"><strong>How You Can Open Command Prompt?<\/strong><\/h2>\n\n\n\n<p>\u2794 You have to press <strong>\u2018Windows + R.\u2019<\/strong><\/p>\n\n\n\n<p>\u2794 Type <strong>\u2018cmd\u2019 <\/strong>in the box.<\/p>\n\n\n\n<p>\u2794 Press Enter<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Step 1: Navigate to the Desired Folder<\/strong><\/h2>\n\n\n\n<p>\u2794 Use the <strong><span class=\"code_syntax\">cd<\/span><\/strong> (change directory) command to move to the folder where you want to create the file.<\/p>\n\n\n\n<p><strong>Example:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><button class=\"copy-btn\" onclick=\"copyCommand(this)\">\n            \ud83d\udccb\n          <\/button><span class=\"copy-msg\">Copied!<\/span>\n<table class=\"has-fixed-layout\"><tbody><tr><td class=\"kb_firewall\"><strong>cd Desktop<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>To check your current location, use:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><button class=\"copy-btn\" onclick=\"copyCommand(this)\">\n            \ud83d\udccb\n          <\/button><span class=\"copy-msg\">Copied!<\/span><table class=\"has-fixed-layout\"><tbody><tr><td class=\"kb_firewall\"><strong>dir<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n<hr>\n\n\n<p><strong>Also Read: <\/strong><a href=\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/479\/check-laravel-version-windows-cmd.html\"><strong>How to Check Laravel Version in Windows CMD?<\/strong><\/a><\/p>\n\n\n<hr>\n\n\n<h2 class=\"wp-block-heading\">Methods to Create a File in Command Prompt<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Method 1: Create a File Using the echo Command (Most Common)<\/strong><\/h3>\n\n\n\n<p>The <strong class=\"code_syntax\">echo<\/strong> command is the most commonly used and beginner-friendly way to create a file in Command Prompt. This method is useful when you want to create a file and add content at the same time.<\/p>\n\n\n\n<p>When you use <strong class=\"code_syntax\">echo<\/strong>, the text you type is written directly into the file. If the file does not exist, CMD automatically creates it. If the file already exists, its contents will be overwritten.<\/p>\n\n\n\n<p><strong>Syntax<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><button class=\"copy-btn\" onclick=\"copyCommand(this)\">\n            \ud83d\udccb\n          <\/button><span class=\"copy-msg\">Copied!<\/span><table class=\"has-fixed-layout\"><tbody><tr><td class=\"kb_firewall\"><strong>echo YourText > filename.extension<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>Example<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><button class=\"copy-btn\" onclick=\"copyCommand(this)\">\n            \ud83d\udccb\n          <\/button><span class=\"copy-msg\">Copied!<\/span><table class=\"has-fixed-layout\"><tbody><tr><td class=\"kb_firewall\"><strong>echo Hello World > sample.txt<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>What Happens Here?<\/strong><\/p>\n\n\n\n<p>\u2794 A new file named <strong>sample.txt<\/strong> is created.<\/p>\n\n\n\n<p>\u2794 The text <strong>&#8220;Hello World&#8221;<\/strong> is written inside the file.<\/p>\n\n\n\n<p>\u2794 If <strong>sample.txt <\/strong>already exists, its old content is overwritten.<\/p>\n\n\n\n<p><strong>When to Use This Method:<\/strong><\/p>\n\n\n\n<p>\u2794 When you want to quickly create a text file.<\/p>\n\n\n\n<p>\u2794 When you want to add a single line of content.<\/p>\n\n\n\n<p>\u2794 When working on scripts or configuration files.<\/p>\n\n\n<hr>\n\n\n<p><strong>Also Read: <\/strong><a href=\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/477\/check-react-version-in-cmd.html\"><strong>How to Check React Version in Windows CMD?<\/strong><\/a><\/p>\n\n\n<hr>\n\n\n<h3 class=\"wp-block-heading\"><strong>Method 2: Create an Empty File Using type nul<\/strong><\/h3>\n\n\n\n<p>If you want to create a file without adding any content, the <strong>type nul<\/strong> method is the best option. This command creates a completely blank file.<\/p>\n\n\n\n<p>This is especially useful when you need an empty file as a placeholder or want to add content later using another editor.<\/p>\n\n\n\n<p><strong>Syntax<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><button class=\"copy-btn\" onclick=\"copyCommand(this)\">\n            \ud83d\udccb\n          <\/button><span class=\"copy-msg\">Copied!<\/span><table class=\"has-fixed-layout\"><tbody><tr><td class=\"kb_firewall\"><strong>type nul > filename.extension<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>Example:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><button class=\"copy-btn\" onclick=\"copyCommand(this)\">\n            \ud83d\udccb\n          <\/button><span class=\"copy-msg\">Copied!<\/span><table class=\"has-fixed-layout\"><tbody><tr><td class=\"kb_firewall\"><strong>type nul > emptyfile.txt<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>What Happens Here?<\/strong><\/p>\n\n\n\n<p>\u2794 CMD creates a file named <strong>emptyfile.txt<\/strong>.<\/p>\n\n\n\n<p>\u2794 No text or data is added to the file.<\/p>\n\n\n\n<p>\u2794 The file size remains 0 bytes.<\/p>\n\n\n\n<p><strong>When to Use This Method:<\/strong><\/p>\n\n\n\n<p>\u2794 When you only need an empty file.<\/p>\n\n\n\n<p>\u2794 When preparing files for applications or servers.<\/p>\n\n\n\n<p>\u2794 When you want full control over content later.<\/p>\n\n\n<hr>\n\n\n<p><strong>Also Read: <\/strong><a href=\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/474\/check-sql-version-in-windows-cmd.html\"><strong>How to Check the SQL Version in Windows CMD?<\/strong><\/a><\/p>\n\n\n<hr>\n\n\n<h3 class=\"wp-block-heading\"><strong>Method 3: Create a File Using the copy con Command<\/strong><\/h3>\n\n\n\n<p>The <strong class=\"code_syntax\">copy con<\/strong> command lets you manually type content into a file from the Command Prompt. This method is interactive and lets you control what goes into the file.<\/p>\n\n\n\n<p>Unlike the <strong class=\"code_syntax\">echo<\/strong> command, this method lets you add multiple lines of text before saving the file.<\/p>\n\n\n\n<p><strong>Syntax<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><button class=\"copy-btn\" onclick=\"copyCommand(this)\">\n            \ud83d\udccb\n          <\/button><span class=\"copy-msg\">Copied!<\/span><table class=\"has-fixed-layout\"><tbody><tr><td class=\"kb_firewall\"><strong>copy con filename.extension<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>Example:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><button class=\"copy-btn\" onclick=\"copyCommand(this)\">\n            \ud83d\udccb\n          <\/button><span class=\"copy-msg\">Copied!<\/span><table class=\"has-fixed-layout\"><tbody><tr><td class=\"kb_firewall\"><strong>copy con notes.txt<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>Step-by-Step Process<\/strong><\/p>\n\n\n\n<p>\u2794 After entering the command, CMD waits for input.<\/p>\n\n\n\n<p>\u2794 Type the content you want to save.<\/p>\n\n\n\n<p>\u2794 Press <strong>Ctrl + Z<\/strong> to signal the end of the file.<\/p>\n\n\n\n<p>\u2794 Press <strong>Enter<\/strong> to save the file.<\/p>\n\n\n\n<p><strong>What Happens Here?<\/strong><\/p>\n\n\n\n<p>\u2794 A file named notes.txt is created.<\/p>\n\n\n\n<p>\u2794 All typed content is saved inside the file.<\/p>\n\n\n\n<p><strong>When to Use This Method:<\/strong><\/p>\n\n\n\n<p>\u2794 When you want to add multiple lines of text.<\/p>\n\n\n\n<p>\u2794 When working without a text editor.<\/p>\n\n\n\n<p>\u2794 For quick notes or configuration entries.<\/p>\n\n\n<hr>\n\n\n<p><strong>Also Read: <\/strong><a href=\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/468\/check-angular-version-in-windows-cmd.html\"><strong>How to Check Angular Version in Windows CMD?<\/strong><\/a><\/p>\n\n\n<hr>\n\n\n<h3 class=\"wp-block-heading\"><strong>Method 4: Create a File Using fsutil (Advanced)<\/strong><\/h3>\n\n\n\n<p>The <strong class=\"code_syntax\">fsutil<\/strong> command is an advanced tool for creating files with a specific size. This command is mostly used for testing, storage allocation, or system-level tasks.<\/p>\n\n\n\n<p>Unlike other methods, this does not add readable text. It simply creates a file with the defined size in bytes.<br><strong>Syntax<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><button class=\"copy-btn\" onclick=\"copyCommand(this)\">\n            \ud83d\udccb\n          <\/button><span class=\"copy-msg\">Copied!<\/span><table class=\"has-fixed-layout\"><tbody><tr><td class=\"kb_firewall\"><strong>fsutil file createnew filename.extension size_in_bytes<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>Example:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><button class=\"copy-btn\" onclick=\"copyCommand(this)\">\n            \ud83d\udccb\n          <\/button><span class=\"copy-msg\">Copied!<\/span><table class=\"has-fixed-layout\"><tbody><tr><td class=\"kb_firewall\"><strong>fsutil file createnew test.txt 1024<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>What Happens Here?<\/strong><\/p>\n\n\n\n<p>\u2794 A file named test.txt is created.<\/p>\n\n\n\n<p>\u2794 The file size is exactly 1024 bytes (1 KB).<\/p>\n\n\n\n<p>\u2794 The file contains no readable text.<\/p>\n\n\n\n<p><strong>Important Note<\/strong><\/p>\n\n\n\n<p>\u2794 Command Prompt must be opened as Administrator.<\/p>\n\n\n\n<p>\u2794 This method is not meant for normal text files.<\/p>\n\n\n\n<p><strong>When to Use This Method:<\/strong><\/p>\n\n\n\n<p>\u2794 For testing disk space.<\/p>\n\n\n\n<p>\u2794 For system or server-level operations.<\/p>\n\n\n\n<p>\u2794 When file size matters more than content.<\/p>\n\n\n<hr>\n\n\n<p><strong>Also Read: <\/strong><a href=\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/488\/check-folder-permission-in-windows-cmd.html\"><strong>How to Check Folder Permission in Windows CMD?<\/strong><\/a><br><\/p>\n\n\n<hr>\n\n\n<h2 class=\"wp-block-heading\"><strong>Verify the File Creation<\/strong><\/h2>\n\n\n\n<p>After creating the file, use:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><button class=\"copy-btn\" onclick=\"copyCommand(this)\">\n            \ud83d\udccb\n          <\/button><span class=\"copy-msg\">Copied!<\/span><table class=\"has-fixed-layout\"><tbody><tr><td class=\"kb_firewall\"><strong>dir<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>This command lists all files in the current directory so you can confirm your file exists.<br><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Common Errors &amp; Tips<\/strong><\/h2>\n\n\n\n<p>\u2794 Access Denied: Run Command Prompt as Administrator<\/p>\n\n\n\n<p>\u2794 Wrong Directory: Always check your location using dir<\/p>\n\n\n\n<p>\u2794 File Overwritten: Use <strong>&gt;&gt;<\/strong> instead of <strong>&gt;<\/strong> to append content<\/p>\n\n\n\n<p><strong>Example (Append Text):<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><button class=\"copy-btn\" onclick=\"copyCommand(this)\">\n            \ud83d\udccb\n          <\/button><span class=\"copy-msg\">Copied!<\/span><table class=\"has-fixed-layout\"><tbody><tr><td class=\"kb_firewall\"><strong>echo New Line >> sample.txt<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n    <div class=\"blg-advrt-main blg-prm-bx\">\n        <div class=\"row\" style=\"display: flex; justify-content: space-evenly; align-items: center;\">\n            <div class=\"col-md-5\">\n                <div class=\"blg-advrt-first blg-advrt-right\">\n                    <img decoding=\"async\" src=\"https:\/\/www.hostitsmart.com\/assets\/images\/Knowledgebase\/windows-hosting.png\" alt=\"windows-hosting\" \/>\n                <\/div>\n            <\/div>\n            <div class=\"col-md-7\">\n                <div class=\"blg-advrt-first blg-advrt-left\">\n                    <div class=\"blg_advrt_cnt\">\n                        Your Terminal Deserves a Powerful Home!                    <\/div>\n                    <p>\n                        Launch your projects on a secure, scalable Windows VPS designed for strong performance.                    <\/p>\n                    <div class=\"blg-advrt-first-btn affl-blg-btn\">\n                        <a href=\"https:\/\/www.hostitsmart.com\/servers\/windows-vps-hosting\">\n                            Explore Windows VPS Host                        <\/a>\n                    <\/div>\n                <\/div>\n            <\/div>\n        <\/div>\n    <\/div>\n    \n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>Creating files using Command Prompt is a simple yet powerful skill. Whether you want to create a blank file, add quick content, or generate files for development and server tasks, CMD gives you full control with just a few commands.<\/p>\n\n\n\n<p>Once you get comfortable with these methods, you will find Command Prompt faster than traditional file creation for sure, especially when managing multiple files or working on hosting servers. Start practicing these commands, and Command Prompt will soon feel like a helpful tool rather than a complicated one.<\/p>\n\n\n\n<p><br><strong>Happy<\/strong> <strong>Commanding!<\/strong><\/p>\n\n\n\n<script>\nfunction copyCommand(btn) {\n  const td = btn.parentElement.querySelector(\"td.kb_firewall\");\n  const text = td.innerText.trim();\nnavigator.clipboard.writeText(text).then(() => {\n    const msg = btn.parentElement.querySelector(\".copy-msg\");\n    msg.style.display = \"inline-block\";\n    setTimeout(() => msg.style.display = \"none\", 1000);\n  });\n}\n<\/script>\n<!-- \/wp:post-content -->","protected":false},"excerpt":{"rendered":"<p>Creating files is one of the most basic tasks while working with a computer. While most users rely on folders and right\u2011click options, the Command Prompt (CMD) offers a faster and more powerful way to create and manage files, especially for developers, system administrators, and anyone working on servers. Using Command Prompt may look intimidating [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[49],"tags":[],"class_list":["post-3976","post","type-post","status-publish","format-standard","hentry","category-vps"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Create a File in Command Prompt?<\/title>\n<meta name=\"description\" content=\"Learn how to create a file in Command Prompt using simple commands with step-by-step examples. Perfect for beginners on Windows!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/489\/create-file-in-windows-cmd.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Create a File in Command Prompt?\" \/>\n<meta property=\"og:description\" content=\"Learn how to create a file in Command Prompt using simple commands with step-by-step examples. Perfect for beginners on Windows!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/489\/create-file-in-windows-cmd.html\" \/>\n<meta property=\"og:site_name\" content=\"Host IT Smart Knowledge base\" \/>\n<meta property=\"article:published_time\" content=\"2026-01-28T06:48:03+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-04-08T12:39:13+00:00\" \/>\n<meta name=\"author\" content=\"Admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Admin\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/489\/create-file-in-windows-cmd.html\",\"url\":\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/489\/create-file-in-windows-cmd.html\",\"name\":\"How to Create a File in Command Prompt?\",\"isPartOf\":{\"@id\":\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/#website\"},\"datePublished\":\"2026-01-28T06:48:03+00:00\",\"dateModified\":\"2026-04-08T12:39:13+00:00\",\"author\":{\"@id\":\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/#\/schema\/person\/317c14a877385667f19d3b7496bd5108\"},\"description\":\"Learn how to create a file in Command Prompt using simple commands with step-by-step examples. Perfect for beginners on Windows!\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/489\/create-file-in-windows-cmd.html\"]}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/#website\",\"url\":\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/\",\"name\":\"Host IT Smart Knowledge base\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/#\/schema\/person\/317c14a877385667f19d3b7496bd5108\",\"name\":\"Admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d4827c56a6721070dde339640d47ff44ba0d0e515c7e577cf29305ab72383fe3?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d4827c56a6721070dde339640d47ff44ba0d0e515c7e577cf29305ab72383fe3?s=96&d=mm&r=g\",\"caption\":\"Admin\"},\"sameAs\":[\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/\"],\"url\":\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Create a File in Command Prompt?","description":"Learn how to create a file in Command Prompt using simple commands with step-by-step examples. Perfect for beginners on Windows!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/489\/create-file-in-windows-cmd.html","og_locale":"en_US","og_type":"article","og_title":"How to Create a File in Command Prompt?","og_description":"Learn how to create a file in Command Prompt using simple commands with step-by-step examples. Perfect for beginners on Windows!","og_url":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/489\/create-file-in-windows-cmd.html","og_site_name":"Host IT Smart Knowledge base","article_published_time":"2026-01-28T06:48:03+00:00","article_modified_time":"2026-04-08T12:39:13+00:00","author":"Admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Admin"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/489\/create-file-in-windows-cmd.html","url":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/489\/create-file-in-windows-cmd.html","name":"How to Create a File in Command Prompt?","isPartOf":{"@id":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/#website"},"datePublished":"2026-01-28T06:48:03+00:00","dateModified":"2026-04-08T12:39:13+00:00","author":{"@id":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/#\/schema\/person\/317c14a877385667f19d3b7496bd5108"},"description":"Learn how to create a file in Command Prompt using simple commands with step-by-step examples. Perfect for beginners on Windows!","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/489\/create-file-in-windows-cmd.html"]}]},{"@type":"WebSite","@id":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/#website","url":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/","name":"Host IT Smart Knowledge base","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/#\/schema\/person\/317c14a877385667f19d3b7496bd5108","name":"Admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d4827c56a6721070dde339640d47ff44ba0d0e515c7e577cf29305ab72383fe3?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d4827c56a6721070dde339640d47ff44ba0d0e515c7e577cf29305ab72383fe3?s=96&d=mm&r=g","caption":"Admin"},"sameAs":["https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/"],"url":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/posts\/3976","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/comments?post=3976"}],"version-history":[{"count":35,"href":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/posts\/3976\/revisions"}],"predecessor-version":[{"id":4321,"href":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/posts\/3976\/revisions\/4321"}],"wp:attachment":[{"href":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/media?parent=3976"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/categories?post=3976"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/tags?post=3976"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}