{"id":7214,"date":"2022-11-15T06:25:00","date_gmt":"2022-11-15T05:25:00","guid":{"rendered":"https:\/\/expert-only.com\/uncategorized\/copy-a-file-with-windows-powershell\/"},"modified":"2022-11-14T15:46:03","modified_gmt":"2022-11-14T14:46:03","slug":"copy-files-with-powershell","status":"publish","type":"post","link":"https:\/\/expert-only.com\/en\/ps\/copy-files-with-powershell\/","title":{"rendered":"Copy files with PowerShell and the Copy-Item command"},"content":{"rendered":"\n<h4 class=\"has-text-align-center wp-block-heading\"><strong><em>How to copy Windows files to another folder with PowerShell?<\/em><\/strong><\/h4>\n\n\n\n<p>There are several efficient options to copy Windows files with the PowerShell command prompt. In PowerShell scripting, use the Copy-Items command in a Windows PowerShell prompt. It is also possible to copy from the GUI, but this option is very manual. Indeed, it is always possible to copy files and folders using the interface provided by Windows. But it is more efficient to make large and specific copies.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 ez-toc-wrap-center counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/expert-only.com\/en\/ps\/copy-files-with-powershell\/#copy-files-with-the-powershell-and-copy-item\" >Copy files with the PowerShell and Copy-Item<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/expert-only.com\/en\/ps\/copy-files-with-powershell\/#1-open-the-powershell-command-prompt\" >1. Open the PowerShell command prompt<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/expert-only.com\/en\/ps\/copy-files-with-powershell\/#2-copy-a-file-to-another-folder\" >2. Copy a file to another folder<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/expert-only.com\/en\/ps\/copy-files-with-powershell\/#3-script-to-copy-and-rename-a-file\" >3. Script to copy and rename a file<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/expert-only.com\/en\/ps\/copy-files-with-powershell\/#4-powershell-script-to-copy-all-files-with-a-filter\" >4. PowerShell script to copy all files with a filter<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/expert-only.com\/en\/ps\/copy-files-with-powershell\/#5-explicitly-enable-a-copy-confirmation-prompt\" >5. Explicitly enable a copy confirmation prompt<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\" id=\"h-copy-files-with-the-powershell-and-copy-item\"><span class=\"ez-toc-section\" id=\"copy-files-with-the-powershell-and-copy-item\"><\/span>Copy files with the PowerShell and Copy-Item<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Indeed, Windows Shell scripting is much more efficient than manual copying. For example, to copy 500&#8217;000 text files with very specific extensions or names. And to make sure that they were all copied, without any error.<\/p>\n\n\n\n<p>Or with strict error checking and recording. Manually, this operation would take days. The PowerShell <em>Copy-Item<\/em> command is the best option available.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"1-open-the-powershell-command-prompt\"><\/span>1. Open the PowerShell command prompt<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Let&#8217;s start the tutorial about hoy copy a file with Windows PowerShell. From the Windows 10 start menu, for example, type &#8220;Windows PowerShell&#8221; in the search field and click on the icon.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"2-copy-a-file-to-another-folder\"><\/span>2. Copy a file to another folder<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>PS command to copy a file from one folder to another existing folder keeping the same name and the same extension.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"powershell\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">Copy-Item -Path C:\\folder\\file.txt -Destination C:\\newfolder\\file.txt<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"3-script-to-copy-and-rename-a-file\"><\/span>3. Script to copy and rename a file<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>By the way, with Power Shell, to modify the name of the copy, simply change the name of the destination file.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"powershell\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">Copy-Item -Path C:\\folder\\file.txt -Destination C:\\folder\\newfile.txt<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"4-powershell-script-to-copy-all-files-with-a-filter\"><\/span>4. PowerShell script to copy all files with a filter<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>That is, with a specific extension or a specific name before the separator. This sample script copies all text files, with a TXT extension, into the <em>newfolder<\/em> folder. And allows overwriting files if they already exist with the <strong><em>-Force<\/em><\/strong> option.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"powershell\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">Copy-Item -Path C:\\folder\\file*.txt -Destination C:\\newfolder -Force<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"981\" height=\"423\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/05\/powershell-copy-file-command-copy-Item-force_en.jpg\" alt=\"Copy files with Powershell from a Windows to another using the Copy-Item command\" class=\"wp-image-7312\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/05\/powershell-copy-file-command-copy-Item-force_en.jpg 981w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/05\/powershell-copy-file-command-copy-Item-force_en-300x129.jpg 300w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/05\/powershell-copy-file-command-copy-Item-force_en-768x331.jpg 768w\" sizes=\"auto, (max-width: 981px) 100vw, 981px\" \/><figcaption class=\"wp-element-caption\"><strong>Copy files with Powershell<\/strong><\/figcaption><\/figure>\n\n\n\n<p>Other Scripting options are available for the <a href=\"https:\/\/docs.microsoft.com\/en-us\/powershell\/scripting\/samples\/working-with-files-and-folders?view=powershell-7.2\" target=\"_blank\" rel=\"noreferrer noopener\">Copy-Item<\/a> command, with for example:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The first: <strong>-Force<\/strong> to overwrite the destination file.<\/li>\n\n\n\n<li>Or: <strong><strong>-Recurse<\/strong><\/strong> to copy recursively from source or destination, depending on where the keyword is in the command.<\/li>\n\n\n\n<li>The <strong>-Filter<\/strong> option to separate the filter from the copy source location.<\/li>\n<\/ul>\n\n\n\n<p>Note that this list of options is not exhaustive.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"5-explicitly-enable-a-copy-confirmation-prompt\"><\/span>5. Explicitly enable a copy confirmation prompt<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Indeed, use these options to better manage and control file copies and avoid overwriting important, potentially unsaved files. This last copy PowerShell script example instructs the system to ask for confirmation before overwriting the files. Use the PowerShell confirmation option: <strong><em>-Confirm<\/em><\/strong>.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"powershell\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">Copy-Item -Path C:\\folder\\file.txt -Destination C:\\folder\\newfile.txt -Confirm<\/pre>\n\n\n\n<p>In conclusion, this first article in the Scripting with Windows PowerShell series shows Scripting PS examples for copying one or more files in Windows. To take it a step further, here &#8216;s <a href=\"https:\/\/expert-only.com\/en\/ms-dos\/copy-windows-files-with-cmd\/\">how to copy files and folders with a cmd script<\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-sql-and-it-tutorials wp-block-embed-sql-and-it-tutorials\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"i0UqAjDUZ8\"><a href=\"https:\/\/expert-only.com\/fr\/ms-dos\/copier-des-fichiers-windows-en-cmd\/\">Comment copier des fichiers avec cmd ?<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"\u00ab\u00a0Comment copier des fichiers avec cmd ?\u00a0\u00bb &#8212; Tutoriels SQL et IT\" src=\"https:\/\/expert-only.com\/fr\/ms-dos\/copier-des-fichiers-windows-en-cmd\/embed\/#?secret=VlAGPafjB3#?secret=i0UqAjDUZ8\" data-secret=\"i0UqAjDUZ8\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>How to copy Windows files to another folder with PowerShell? There are several efficient options to copy Windows files with the PowerShell command prompt. In PowerShell scripting, use the Copy-Items command in a Windows PowerShell prompt. It is also <a class=\"mh-excerpt-more\" href=\"https:\/\/expert-only.com\/en\/ps\/copy-files-with-powershell\/\" title=\"Copy files with PowerShell and the Copy-Item command\">&#8230;<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":5662,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[522],"tags":[412,417,418,414,524],"class_list":{"0":"post-7214","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-ps","8":"tag-batch","9":"tag-file","10":"tag-folder","11":"tag-script","12":"tag-scripting-en"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.7 (Yoast SEO v26.2) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Copy files with PowerShell and the Copy-Item command<\/title>\n<meta name=\"description\" content=\"How to copy files with a PowerShell script? Use the Copy-Item command and manage the copy from the Windows terminal or batch scripts.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/expert-only.com\/en\/ps\/copy-files-with-powershell\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Copy files with PowerShell and the Copy-Item command\" \/>\n<meta property=\"og:description\" content=\"How to copy files with a PowerShell script? Use the Copy-Item command and manage the copy from the Windows terminal or batch scripts.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/expert-only.com\/en\/ps\/copy-files-with-powershell\/\" \/>\n<meta property=\"og:site_name\" content=\"SQL and IT Tutorials\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/ExpertOnlyCom\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-11-15T05:25:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/07\/inspiration_dark_pencils-CDFB9498B85_1920x1080.jpeg\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"1080\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Expert-Only\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@expert_only\" \/>\n<meta name=\"twitter:site\" content=\"@expert_only\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Expert-Only\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/expert-only.com\/en\/ps\/copy-files-with-powershell\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/expert-only.com\/en\/ps\/copy-files-with-powershell\/\"},\"author\":{\"name\":\"Expert-Only\",\"@id\":\"https:\/\/expert-only.com\/en\/#\/schema\/person\/406a9576b52944f018739a42046873ef\"},\"headline\":\"Copy files with PowerShell and the Copy-Item command\",\"datePublished\":\"2022-11-15T05:25:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/expert-only.com\/en\/ps\/copy-files-with-powershell\/\"},\"wordCount\":448,\"publisher\":{\"@id\":\"https:\/\/expert-only.com\/en\/#organization\"},\"image\":{\"@id\":\"https:\/\/expert-only.com\/en\/ps\/copy-files-with-powershell\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/07\/inspiration_dark_pencils-CDFB9498B85_1920x1080.jpeg\",\"keywords\":[\"Batch\",\"File\",\"Folder\",\"Script\",\"Scripting\"],\"articleSection\":[\"Powershell\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/expert-only.com\/en\/ps\/copy-files-with-powershell\/\",\"url\":\"https:\/\/expert-only.com\/en\/ps\/copy-files-with-powershell\/\",\"name\":\"Copy files with PowerShell and the Copy-Item command\",\"isPartOf\":{\"@id\":\"https:\/\/expert-only.com\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/expert-only.com\/en\/ps\/copy-files-with-powershell\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/expert-only.com\/en\/ps\/copy-files-with-powershell\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/07\/inspiration_dark_pencils-CDFB9498B85_1920x1080.jpeg\",\"datePublished\":\"2022-11-15T05:25:00+00:00\",\"description\":\"How to copy files with a PowerShell script? Use the Copy-Item command and manage the copy from the Windows terminal or batch scripts.\",\"breadcrumb\":{\"@id\":\"https:\/\/expert-only.com\/en\/ps\/copy-files-with-powershell\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/expert-only.com\/en\/ps\/copy-files-with-powershell\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/expert-only.com\/en\/ps\/copy-files-with-powershell\/#primaryimage\",\"url\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/07\/inspiration_dark_pencils-CDFB9498B85_1920x1080.jpeg\",\"contentUrl\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/07\/inspiration_dark_pencils-CDFB9498B85_1920x1080.jpeg\",\"width\":1920,\"height\":1080},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/expert-only.com\/en\/ps\/copy-files-with-powershell\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"en\",\"item\":\"https:\/\/expert-only.com\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Copy files with PowerShell and the Copy-Item command\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/expert-only.com\/en\/#website\",\"url\":\"https:\/\/expert-only.com\/en\/\",\"name\":\"SQL and IT Tutorials\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/expert-only.com\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/expert-only.com\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/expert-only.com\/en\/#organization\",\"name\":\"Expert-Only\",\"url\":\"https:\/\/expert-only.com\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/expert-only.com\/en\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/09\/cropped-logo_Expert-Only.jpg\",\"contentUrl\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/09\/cropped-logo_Expert-Only.jpg\",\"width\":381,\"height\":174,\"caption\":\"Expert-Only\"},\"image\":{\"@id\":\"https:\/\/expert-only.com\/en\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/ExpertOnlyCom\/\",\"https:\/\/x.com\/expert_only\",\"https:\/\/www.youtube.com\/channel\/UCMS5sR_FwAetB0FmciNvUaA\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/expert-only.com\/en\/#\/schema\/person\/406a9576b52944f018739a42046873ef\",\"name\":\"Expert-Only\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/expert-only.com\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/084b15660763ff5b13bb60b2f52f97bb?s=96&d=identicon&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/084b15660763ff5b13bb60b2f52f97bb?s=96&d=identicon&r=g\",\"caption\":\"Expert-Only\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Copy files with PowerShell and the Copy-Item command","description":"How to copy files with a PowerShell script? Use the Copy-Item command and manage the copy from the Windows terminal or batch scripts.","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:\/\/expert-only.com\/en\/ps\/copy-files-with-powershell\/","og_locale":"en_US","og_type":"article","og_title":"Copy files with PowerShell and the Copy-Item command","og_description":"How to copy files with a PowerShell script? Use the Copy-Item command and manage the copy from the Windows terminal or batch scripts.","og_url":"https:\/\/expert-only.com\/en\/ps\/copy-files-with-powershell\/","og_site_name":"SQL and IT Tutorials","article_publisher":"https:\/\/www.facebook.com\/ExpertOnlyCom\/","article_published_time":"2022-11-15T05:25:00+00:00","og_image":[{"width":1920,"height":1080,"url":"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/07\/inspiration_dark_pencils-CDFB9498B85_1920x1080.jpeg","type":"image\/jpeg"}],"author":"Expert-Only","twitter_card":"summary_large_image","twitter_creator":"@expert_only","twitter_site":"@expert_only","twitter_misc":{"Written by":"Expert-Only","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/expert-only.com\/en\/ps\/copy-files-with-powershell\/#article","isPartOf":{"@id":"https:\/\/expert-only.com\/en\/ps\/copy-files-with-powershell\/"},"author":{"name":"Expert-Only","@id":"https:\/\/expert-only.com\/en\/#\/schema\/person\/406a9576b52944f018739a42046873ef"},"headline":"Copy files with PowerShell and the Copy-Item command","datePublished":"2022-11-15T05:25:00+00:00","mainEntityOfPage":{"@id":"https:\/\/expert-only.com\/en\/ps\/copy-files-with-powershell\/"},"wordCount":448,"publisher":{"@id":"https:\/\/expert-only.com\/en\/#organization"},"image":{"@id":"https:\/\/expert-only.com\/en\/ps\/copy-files-with-powershell\/#primaryimage"},"thumbnailUrl":"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/07\/inspiration_dark_pencils-CDFB9498B85_1920x1080.jpeg","keywords":["Batch","File","Folder","Script","Scripting"],"articleSection":["Powershell"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/expert-only.com\/en\/ps\/copy-files-with-powershell\/","url":"https:\/\/expert-only.com\/en\/ps\/copy-files-with-powershell\/","name":"Copy files with PowerShell and the Copy-Item command","isPartOf":{"@id":"https:\/\/expert-only.com\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/expert-only.com\/en\/ps\/copy-files-with-powershell\/#primaryimage"},"image":{"@id":"https:\/\/expert-only.com\/en\/ps\/copy-files-with-powershell\/#primaryimage"},"thumbnailUrl":"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/07\/inspiration_dark_pencils-CDFB9498B85_1920x1080.jpeg","datePublished":"2022-11-15T05:25:00+00:00","description":"How to copy files with a PowerShell script? Use the Copy-Item command and manage the copy from the Windows terminal or batch scripts.","breadcrumb":{"@id":"https:\/\/expert-only.com\/en\/ps\/copy-files-with-powershell\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/expert-only.com\/en\/ps\/copy-files-with-powershell\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/expert-only.com\/en\/ps\/copy-files-with-powershell\/#primaryimage","url":"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/07\/inspiration_dark_pencils-CDFB9498B85_1920x1080.jpeg","contentUrl":"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/07\/inspiration_dark_pencils-CDFB9498B85_1920x1080.jpeg","width":1920,"height":1080},{"@type":"BreadcrumbList","@id":"https:\/\/expert-only.com\/en\/ps\/copy-files-with-powershell\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"en","item":"https:\/\/expert-only.com\/en\/"},{"@type":"ListItem","position":2,"name":"Copy files with PowerShell and the Copy-Item command"}]},{"@type":"WebSite","@id":"https:\/\/expert-only.com\/en\/#website","url":"https:\/\/expert-only.com\/en\/","name":"SQL and IT Tutorials","description":"","publisher":{"@id":"https:\/\/expert-only.com\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/expert-only.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/expert-only.com\/en\/#organization","name":"Expert-Only","url":"https:\/\/expert-only.com\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/expert-only.com\/en\/#\/schema\/logo\/image\/","url":"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/09\/cropped-logo_Expert-Only.jpg","contentUrl":"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/09\/cropped-logo_Expert-Only.jpg","width":381,"height":174,"caption":"Expert-Only"},"image":{"@id":"https:\/\/expert-only.com\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/ExpertOnlyCom\/","https:\/\/x.com\/expert_only","https:\/\/www.youtube.com\/channel\/UCMS5sR_FwAetB0FmciNvUaA"]},{"@type":"Person","@id":"https:\/\/expert-only.com\/en\/#\/schema\/person\/406a9576b52944f018739a42046873ef","name":"Expert-Only","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/expert-only.com\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/084b15660763ff5b13bb60b2f52f97bb?s=96&d=identicon&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/084b15660763ff5b13bb60b2f52f97bb?s=96&d=identicon&r=g","caption":"Expert-Only"}}]}},"_links":{"self":[{"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/posts\/7214","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/comments?post=7214"}],"version-history":[{"count":0,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/posts\/7214\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/media\/5662"}],"wp:attachment":[{"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/media?parent=7214"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/categories?post=7214"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/tags?post=7214"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}