<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>copy folder names Archives - TheTechMentor.com</title>
	<atom:link href="https://www.thetechmentor.com/posts/tag/copy-folder-names/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.thetechmentor.com</link>
	<description>Computer Technicians to IT Business Owners, Computer fixes and tools</description>
	<lastBuildDate>Wed, 11 Oct 2023 20:38:58 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.5.17</generator>

<image>
	<url>https://www.thetechmentor.com/wp-content/uploads/2013/12/icon.png</url>
	<title>copy folder names Archives - TheTechMentor.com</title>
	<link>https://www.thetechmentor.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Copy file and folder names into Excel (remove path automatically)</title>
		<link>https://www.thetechmentor.com/posts/copy-file-folder-names-into-excel/</link>
					<comments>https://www.thetechmentor.com/posts/copy-file-folder-names-into-excel/#respond</comments>
		
		<dc:creator><![CDATA[Jeff]]></dc:creator>
		<pubDate>Mon, 26 Jul 2021 20:15:19 +0000</pubDate>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[copy file names]]></category>
		<category><![CDATA[copy folder names]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[windows 10]]></category>
		<guid isPermaLink="false">https://www.thetechmentor.com/?p=7575</guid>

					<description><![CDATA[<p>How to copy-paste file names or folder names into Excel. Learn how to copy a list of file names into Excel and also how to copy folder names into Excel. First you start with a list of folders or file names. Though it&#8217;s not obvious how you copy those names, you can do it in [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.thetechmentor.com/posts/copy-file-folder-names-into-excel/">Copy file and folder names into Excel (remove path automatically)</a> appeared first on <a rel="nofollow" href="https://www.thetechmentor.com">TheTechMentor.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h1>How to copy-paste file names or folder names into Excel.</h1>
<p><span style="font-size: 14pt;">Learn <strong>how to copy a list of file names into Excel</strong> and also how to <strong>copy folder names into Excel</strong>. First you start with a list of folders or file names. Though it&#8217;s not obvious how you copy those names, you can do it in two main steps. Unless you know how to, it&#8217;s hard to see how to get just the list of names <strong>instead of copying the files themselves</strong>. That is what you get if you just select and click copy. Not obvious but it <em>is simple</em> and I&#8217;ll break it down so almost anybody can do it! Read on.</span></p>
<h3>Contents (click to jump to the section that you need)</h3>
<p><a href="#intro-copy-file-names-excel"><span style="text-decoration: underline;"><span style="font-size: 14pt; color: #0000ff; text-decoration: underline;">Introduction</span></span></a></p>
<p><a href="#how-to-copy-file-names-into-excel"><span style="text-decoration: underline;"><span style="font-size: 14pt; color: #0000ff; text-decoration: underline;">How to <span style="background-color: #00ffff;">Copy</span> FILE NAMES into Excel (or text file)</span></span></a></p>
<p style="padding-left: 40px;"><a href="#copy-all-file-names-in-a-folder-windows-10"><span style="text-decoration: underline;"><span style="font-size: 14pt; color: #0000ff; text-decoration: underline;">Copy all file names in a folder Windows 10</span></span></a></p>
<p style="padding-left: 40px;"><a href="#paste-into-text-file"><span style="text-decoration: underline; font-size: 14pt;"><span style="color: #0000ff; text-decoration: underline;">How to <span style="background-color: #00ffff;">Paste</span> into a text file</span></span></a></p>
<p style="padding-left: 40px;"><a href="#how-to-cut-filenames-pasted-in-excel"><span style="text-decoration: underline; font-size: 14pt;"><span style="color: #0000ff; text-decoration: underline;">Special formula to trim (<span style="background-color: #ffff00;">remove path</span>) pasted filenames In Excel</span></span></a></p>
<p><a href="#how-to-copy-folder-names-into-excel"><span style="text-decoration: underline;"><span style="font-size: 14pt; color: #0000ff; text-decoration: underline;">How to Copy <span style="background-color: #ffff00;">FOLDER NAMES</span> into Excel (or other app)</span></span></a></p>
<p style="padding-left: 40px;"><span style="text-decoration: underline;"><span style="font-size: 14pt; color: #0000ff; text-decoration: underline;"><a href="#how-to-copy-multiple-folder-names-into-excel"><span style="color: #0000ff; text-decoration: underline;">Copy multiple folder names</span></a><br /></span></span></p>
<p style="padding-left: 40px;"><a href="#how-to-cut-folder-names-pasted-in-excel"><span style="text-decoration: underline; font-size: 14pt;"><span style="color: #0000ff; text-decoration: underline;">Formula to cut down Extracted folder names (remove paths)</span></span></a></p>
<p><a href="#copy-folder-file-names-excel"><span style="text-decoration: underline;"><span style="font-size: 14pt; color: #0000ff; text-decoration: underline;">Summary</span></span></a></p>
<h2 id="intro-copy-file-names-excel">Introduction</h2>
<p><span style="font-size: 14pt;">You might need to get a list of folder names or file names into another useful place, like Excel or a text file. Let&#8217;s say you have your list already. It might be all folders on your PC for example, or more likely a list of sub-folders. </span></p>
<p><span style="font-size: 14pt;">Now you want to know how to export them to Excel or another app (yes, you can use other apps or programs as the destination). </span></p>
<p><span style="font-size: 14pt;">You select the ones you want, click copy, and&#8230; Uh-oh, no you have just copied all the files or folders (<em>not the names</em>). You can&#8217;t past <em>those</em> into an Excel sheet or a text file. </span></p>
<p><span style="font-size: 14pt;">Seems impossible, but there is a <strong>sneaky yet easy</strong> way to do it. </span></p>
<p><span style="font-size: 14pt;">We will answer in detail the question</span><span style="font-size: 14pt;"> </span><span style="font-size: 14pt;">&#8220;how do I copy a list of file names into excel?&#8221; </span></p>
<p><span style="font-size: 14pt;">In other words, &#8220;how to export file names to excel&#8221; when you are asking for the files names only which are contained in a folder (or directory) in Windows, like you see in File Explorer.<br /></span></p>
<p><span style="font-size: 14pt;"> After we&#8217;ve shown how to copy file names from folder to Excel, we&#8217;ll show <a href="#how-to-copy-folder-names-into-excel"><span style="text-decoration: underline;"><span style="color: #0000ff; text-decoration: underline;">how do it with a list of folder names</span></span></a> (i.e. the folder names only).<br /></span></p>
<h4>Recommended Reading:</h4>
<p><span style="font-size: 14pt;"><span style="text-decoration: underline;"><span style="color: #0000ff; text-decoration: underline;"><a style="color: #0000ff; text-decoration: underline;" href="https://www.thetechmentor.com/posts/how-to-alphabetize-in-ms-excel/">How to Alphabetize in Excel</a></span></span> (opens in new tab), including examples that show how to sort by last name then first name.</span></p>
<h2 id="how-to-copy-file-names-into-excel">How to Copy File Names into Excel</h2>
<p><span style="font-size: 14pt;">We are going to walk you through the process so anyone can follow it step by step.</span></p>
<p><span style="font-size: 14pt;">If you know most of how to do this, you should be able to skim read just the highlights.</span></p>
<p style="padding-left: 40px;"><span style="font-size: 14pt;"><strong>If you are an expert</strong>, here it is, super short:</span></p>
<ul>
<li><span style="font-size: 14pt;">Select multiple files (or just one).</span></li>
<li><span style="font-size: 14pt;">&lt;Shift&gt; + right click on a selected file.</span></li>
<li><span style="font-size: 14pt;">Select &#8216;Copy as Path&#8217;</span></li>
<li><span style="font-size: 14pt;">&lt;Ctrl&gt; + &lt;v&gt; into Excel</span></li>
<li><span style="font-size: 14pt;">Use my formula to easily trim path from list of filenames with path.</span></li>
</ul>
<p style="padding-left: 40px;"><span style="font-size: 14pt;">Click here to <a href="#how-to-cut-filenames-pasted-in-excel"><span style="text-decoration: underline;"><span style="color: #0000ff; text-decoration: underline;">jump direct to the formula</span></span></a>.<br /></span></p>
<p><span style="font-size: 14pt;">As that probably isn&#8217;t detailed enough for most people, read on to see it step by step.</span></p>
<h3>Step 1 Select the files you want to copy in your list of file names</h3>
<p><span style="font-size: 14pt;">Open &#8216;My Computer&#8217; (or &#8216;This PC&#8217;) and go to the files you want.</span></p>
<p><span style="font-size: 14pt;">You can select just one file or multiple file names.</span></p>
<p><span style="font-size: 14pt;">There are many way to select multiple file names. </span></p>
<p><span style="font-size: 14pt;">For example, you can click and drag the mouse over the ones you want. </span></p>
<div id="attachment_7582" style="width: 610px" class="wp-caption alignnone"><img aria-describedby="caption-attachment-7582" class="wp-image-7582 size-full" src="https://www.thetechmentor.com/wp-content/uploads/2021/01/how-to-copy-filenames.jpg" alt="how to copy file names into excel" width="600" height="400" srcset="https://www.thetechmentor.com/wp-content/uploads/2021/01/how-to-copy-filenames.jpg 600w, https://www.thetechmentor.com/wp-content/uploads/2021/01/how-to-copy-filenames-300x200.jpg 300w, https://www.thetechmentor.com/wp-content/uploads/2021/01/how-to-copy-filenames-595xh.jpg 595w" sizes="(max-width: 600px) 100vw, 600px" /><p id="caption-attachment-7582" class="wp-caption-text"><span style="font-size: 14pt;">This image shows how to copy file names by selecting them (with click and drag) to paste into Excel at a later step.</span></p></div>
<h4 id="copy-all-file-names-in-a-folder-windows-10">Copy all file names in a folder Windows 10:</h4>
<p><span style="font-size: 14pt;">You can hit <strong>&lt;Ctrl&gt; + &lt;a&gt;</strong>.</span></p>
<p><span style="font-size: 14pt;">The &#8216;a&#8217; is to select and copy all file names in a folder in Windows 10 &#8211; that is hold down the &#8216;control&#8217; and tap the &#8216;A&#8217; key for the letter &#8216;a&#8217;. </span></p>
<p><span style="font-size: 14pt;">It is the same shortcut to select all items (not just files) within any directory and many views of items in all versions of Windows, it seems.<br /></span></p>
<p><span style="font-size: 14pt;">Alternatively, if you want a specific selection of your file names do this: Press &lt;Ctrl&gt; and click on each individual file to select just the file names you want. You can click again to deselect one.</span></p>
<p><span style="font-size: 14pt;">There are many more ways to copy filenames from Windows Explorer, once you have selected them using the above step. </span></p>
<p><span style="font-size: 14pt;">You can sort the list by clicking the header as shown below &#8211; either by alphabetically (Name) or by Date when in the &#8216;Details&#8217; view (rather than icon view). To see the &#8216;Details&#8217; view, look at the top, for the ribon and click &#8216;View&#8217;, and then &#8216;Details&#8217;.<br /></span></p>
<div id="attachment_7583" style="width: 410px" class="wp-caption alignnone"><img aria-describedby="caption-attachment-7583" class="wp-image-7583 size-full" src="https://www.thetechmentor.com/wp-content/uploads/2021/01/copy-all-filenames-in-folder-windows-10.jpg" alt="copy all file names in a folder windows 10" width="400" height="311" srcset="https://www.thetechmentor.com/wp-content/uploads/2021/01/copy-all-filenames-in-folder-windows-10.jpg 400w, https://www.thetechmentor.com/wp-content/uploads/2021/01/copy-all-filenames-in-folder-windows-10-300x233.jpg 300w" sizes="(max-width: 400px) 100vw, 400px" /><p id="caption-attachment-7583" class="wp-caption-text"><span style="font-size: 14pt;">Use the Control key and the &#8216;a&#8217; key to select and copy all file names in a folder in Windows 10. You may like to sort by Name or Date first. Note the date information won&#8217;t be exported to Excel via this method. The next part of how to copy the file names follows below.</span></p></div>
<p><span style="font-size: 14pt;">If you don&#8217;t want all the file names, with the list sorted you can <strong>select adjacent files</strong> by first clicking on the end of the range of files names you want, then hold &lt;Shift&gt; and click the other end of the range of filenames in your list.</span></p>
<p><span style="font-size: 14pt;">There are many ways to do it. I guess you get the picture and may have your own preferred way.</span></p>
<p><span style="font-size: 14pt;">If you have the particular case of wanting to select from a search for specific files, see <a href="https://www.thetechmentor.com/posts/2-tricks-save-explorer-search-results-excel/" target="_blank" rel="noopener noreferrer"><span style="text-decoration: underline;"><span style="color: #0000ff; text-decoration: underline;">Save Explorer <em>Search Results</em> to Excel.</span></span></a></span></p>
<p><span style="font-size: 14pt;">So, we have selected all files, next to copy the names not the files.</span></p>
<p><span style="font-size: 14pt;">Here is how to copy the file names (not the files).</span></p>
<h3>Step 2 Copy File Names</h3>
<p><span style="font-size: 14pt;"><span style="font-size: 14pt;">This is a special way to </span><strong style="font-size: 14pt;">copy your </strong><span style="font-size: 18.6667px;"><b>selection,</b></span><span style="font-size: 14pt;"> so you </span><strong style="font-size: 14pt;">get the names</strong><span style="font-size: 14pt;"> and </span><em style="font-size: 14pt;">not the whole files</em><span style="font-size: 14pt;">. </span></span></p>
<p><span style="font-size: 14pt;">To <span id="1" class="HALYaf KKjvXb" role="tabpanel"><span class="zRhise"><span class="PkjLuf " title="extract file names from folder">extract file names from folder</span></span></span>s, do this:</span></p>
<p><span style="font-size: 14pt;">Press <strong>&lt;Shift&gt; + Right-Click</strong>. </span></p>
<p><span style="font-size: 14pt;">To be clear, that is press the &lt;Shift&gt; key and while still pressing it, then click the right mouse button on any of your selected file names (any file will do if all files are selected).</span></p>
<p><span style="font-size: 14pt;">This shows a less often viewed pop up menu. </span></p>
<p><span style="font-size: 14pt;">In this menu options list scan down to find “<strong>Copy as Path</strong>”. See below for an example.</span></p>
<div id="attachment_7584" style="width: 250px" class="wp-caption alignnone"><img aria-describedby="caption-attachment-7584" class="wp-image-7584 size-full" src="https://www.thetechmentor.com/wp-content/uploads/2021/01/copy-as-path-into-excel.jpg" alt="shift key and right click gives this menu with Copy as Path " width="240" height="380" srcset="https://www.thetechmentor.com/wp-content/uploads/2021/01/copy-as-path-into-excel.jpg 240w, https://www.thetechmentor.com/wp-content/uploads/2021/01/copy-as-path-into-excel-189x300.jpg 189w" sizes="(max-width: 240px) 100vw, 240px" /><p id="caption-attachment-7584" class="wp-caption-text"><span style="font-size: 14pt;">Copy file names using Copy as Path to be sure to copy the names (not the full files) to the clip board ready to paste into Excel.</span></p></div>
<p><span style="font-size: 14pt;">Now, <strong>if you can&#8217;t see it</strong>, remember it should be there<em> if you hold down the shift key</em> when you right click. Look closely at the screen copy for how it looks in Windows 10. </span></p>
<p><span style="font-size: 14pt;">In Windows 7 and Windows 8 this pop-up menu will look a little different, but the shift right-click menu contains &#8216;Copy as Path&#8217;.</span></p>
<p><span style="font-size: 14pt;">So again, just to be clear, if you do not see ‘Copy as Path’ in your pop-up options, check again if you still have &lt;Shift&gt; held down when you clicked the right mouse button on a selected or highlighted file.</span></p>
<p style="padding-left: 40px;"><span style="font-size: 14pt;"><span style="background-color: #00ffff;">TIP:</span> If you find you didn&#8217;t have the &lt;Shift&gt; key held down, simply hold shift now and right-click on one of your already selected file names (away from the menu that already popped up) so that your file selection remains selected. </span></p>
<p style="padding-left: 40px;"><span style="font-size: 14pt;">This just saves you having to select multiple file names again. Remember this one because it&#8217;s common to forget the first few times you do it after you learn it here.</span></p>
<p><span style="font-size: 14pt;">So by this you have you have <span class="zRhise"><span class="PkjLuf " title="extract file names from folder">extracted file names from folder(s).</span></span> Next, how to copy file names into Excel, to complete the copy paste into excel (or text file).</span></p>
<h3>Step 3 Paste to Export File Names into Excel or Text File</h3>
<p><span style="font-size: 14pt;">I cover here how to copy multiple file names into excel and also as an alternative I cover how to paste into a text file instead. You could paste into Microsoft Outlook or other email program, Google docs, or what ever software you have with a text editing field.</span></p>
<p><span style="font-size: 14pt;">Go to your excel file and select where you want to paste. Make sure there is nothing below the selected sell that you wouldn&#8217;t want pasted over.</span></p>
<p><span style="font-size: 14pt;">Press <strong>&lt;Ctrl&gt; + &lt;v&gt;</strong>. </span></p>
<p><span style="font-size: 14pt;">That is hold down the control key and then press the letter v.</span></p>
<p><span style="font-size: 14pt;">That is a shortcut, and there are many other ways to paste.</span></p>
<p><span style="font-size: 14pt;">If you don&#8217;t like using short cut key combinations, you can use the click the icon with the image of the clipboard (often with Paste written under it).</span></p>
<p><span style="font-size: 14pt;">Another alternative is to right click and then paste (use the paste icon).</span></p>
<h3>More than just a list of file names?</h3>
<p style="padding-left: 40px;"><span style="font-size: 14pt;"><span style="background-color: #00ffff;">NOTE:</span> <strong>Do not worry</strong> when you see there is more stuff in there than just the file names! At this point the file path as well as the file name will be pasted. The next step will help you clean that up to leave only the file names if that is all you need.</span></p>
<h4 id="paste-into-text-file"><span style="font-size: 14pt;">To paste into a text file:</span></h4>
<p><span style="font-size: 14pt;">Open an existing text file or start a new one. You will need Notepad or other text editor. If you don&#8217;t know how to do this, one way is to start Notepad. Since Notepad is included in every version of Windows, we&#8217;ll demonstrate with that.</span></p>
<p><span style="font-size: 14pt;">Windows 8: Swipe down from the right and start to type Notepad in the search.</span></p>
<p><span style="font-size: 14pt;">Windows 10: In the search bar (normally at the bottom of the screen, unless you moved it!) start to type Notepad. Only the first two or three characters are likely to be required for Windows to respond by showing the Notepad app. </span></p>
<p><span style="font-size: 14pt;">Click on the Notepad icon and you are away!</span></p>
<h3>Step 4 Tidy up the list of file names pasted into Excel or Notepad.</h3>
<p><span style="font-size: 14pt;">As you will now see, whether you have pasted a single file or multiple file names, they all come with the location of the file too.</span></p>
<p><span style="font-size: 14pt;">If you don&#8217;t have a big list of files, you can manually edit them. Yes, it might take a little time, but you will have completed your task to copy and paste a list of file names into Excel.</span></p>
<p><span style="font-size: 14pt;">Before you groan, if you have a <strong>huge list of file names</strong> (or even a few and you are lazy like me) I have a brilliant <span style="background-color: #ffff00;">secret formula</span> that will cut out everything except the file name. I&#8217;ll show that secret too!</span></p>
<p><span style="font-size: 14pt;">So, you can click in the Formula bar at the top of each cell in turn, then <strong>delete the unwanted file path manually</strong>, leaving only the name.</span></p>
<p><span style="font-size: 14pt;">Or you can double-click on the excel cell and edit the text in the cell. </span></p>
<p><span style="font-size: 14pt;">Or you can use the function key &lt;F2&gt;. </span></p>
<p><span style="font-size: 14pt;">Just find the function keys near the top of your keyboard and press &#8216;F2&#8217;.</span></p>
<p><span style="font-size: 14pt;">Either way, you can select the unwanted part of the text before the file name itself, by clicking and dragging the mouse. </span></p>
<p><span style="font-size: 14pt;">Or you can press arrow keys to get the cursor when you need and tap delete, delete, delete, delete, &#8230; etc.! <img src="https://www.thetechmentor.com/wp-content/plugins/wp-edit/plugins/emoticons/img/smiley-laughing.gif" /></span></p>
<h3 id="how-to-cut-filenames-pasted-in-excel">Special formula to cut pasted filenames</h3>
<p><span style="font-size: 14pt;">Here is one great advantage of using Microsoft Excel when you do copy file names into Excel this way.<br /></span></p>
<p><span style="font-size: 14pt; background-color: #ffff00;">Excel can automatically trim your list down to just all the files names only for you.</span></p>
<p><span style="font-size: 14pt;">If you are not familiar with Excel formulas, this can work for you, but you will need to have pasted the file list in Cell B2. Maybe you will want to start a new Excel sheet so there is nothing else in there, if that is the case.</span></p>
<p><span style="font-size: 18pt;"><a href="https://www.thetechmentor.com/wp-content/uploads/2021/03/copy_file_and_folder_names_into_excel.zip" class="broken_link"><span style="text-decoration: underline;"><span style="color: #0000ff; text-decoration: underline;">Click here to download an excel file with the formula and examples.</span></span></a></span></p>
<p><span style="font-size: 14pt;">You can copy and paste the formula from there.</span></p>
<p><span style="font-size: 14pt;">If you don&#8217;t want to download the file, you can do the following:</span></p>
<p><span style="font-size: 14pt;">Copy from this website and Paste my PARTIAL formula below into Excel (I suggest Cell A1).</span></p>
<p><span style="font-size: 14pt;">See also the note further below.</span></p>
<p style="padding-left: 40px;"><span style="font-size: 16pt;">=TRIM(RIGHT(SUBSTITUTE(B1, </span></p>
<p><span style="font-size: 14pt;">Then continue to write the rest of the formula as per the image below.<br /></span></p>
<div id="attachment_7585" style="width: 218px" class="wp-caption alignnone"><img aria-describedby="caption-attachment-7585" class="wp-image-7585 size-full" src="https://www.thetechmentor.com/wp-content/uploads/2021/01/part-formula-filenames-in-excel.jpg" alt="part of formula to get filenames in excel" width="208" height="25" /><p id="caption-attachment-7585" class="wp-caption-text"><span style="font-size: 14pt;">Those are Excel formula quotes! Strange (or clever?) formula is it not?!</span></p></div>
<p style="padding-left: 40px;"><span style="font-size: 14pt;"><span style="background-color: #00ffff;">NOTE:</span> Why did I show the formula like this? It is because you need to be sure you get the Excel formula quote marks into the formula. This blog automatically changes formula quotes to curly or &#8216;smart&#8217; quotes. A good way to <strong>be certain the formula works</strong> is to type it direct into Excel yourself (sorry!). If you copy and paste from a website, sometimes you get the &#8216;fancy&#8217; 66-99 version of quote marks (or otherwise modified quotation marks which are not suitable for Excel) which will stop my formula from working (even if they don&#8217;t look different)!</span></p>
<p><span style="font-size: 14pt;">As stated above, to use my formula without any alterations, you will need to have pasted your file list (and paths) into cell B1.</span></p>
<p><span style="font-size: 14pt;">If you are familiar with excel formulae, you can paste wherever you need and edit my formula to suit.</span></p>
<p><span style="font-size: 14pt;">That will be easy if you have a basic understanding with Excel formula cell references.</span></p>
<p><span style="font-size: 14pt;">Do not worry, you do not need to know much about formulas or understand this one in particular. Just paste it (preferred) or type it in (less preferred in case you mistype it).</span></p>
<p><span style="font-size: 14pt;">The final formula to paste into Cell A1 with additional typing should look like:</span></p>
<div id="attachment_7586" style="width: 710px" class="wp-caption alignnone"><img aria-describedby="caption-attachment-7586" class="size-full wp-image-7586" src="https://www.thetechmentor.com/wp-content/uploads/2021/01/formula-filename-in-excel.jpg" alt="" width="700" height="80" srcset="https://www.thetechmentor.com/wp-content/uploads/2021/01/formula-filename-in-excel.jpg 700w, https://www.thetechmentor.com/wp-content/uploads/2021/01/formula-filename-in-excel-300x34.jpg 300w, https://www.thetechmentor.com/wp-content/uploads/2021/01/formula-filename-in-excel-595xh.jpg 595w" sizes="(max-width: 700px) 100vw, 700px" /><p id="caption-attachment-7586" class="wp-caption-text"><span style="font-size: 14pt;">Formula to extract filenames in Excel in cell A1 wit reference to cell B2.</span></p></div>
<p><span style="font-size: 14pt;">Now you can copy and paste this formula next to every file name and path in your list.</span></p>
<p><span style="font-size: 14pt;">Again, as with all things Excel, there are many ways to do this.</span></p>
<h3>Translating from another language?</h3>
<p><span style="font-size: 14pt;">If you are reading this article in a language other than English, please note the above formulae is for the English version of Excel. Different languages have different text to describe the equivalent formulae in your language. See further below to learn <a href="#formula-in-your-language"><span style="text-decoration: underline;"><span style="background-color: #ffff00; color: #0000ff; text-decoration: underline;">how to get the formula in your language</span></span></a>.</span></p>
<h3>After pasting formula into every Excel cell.</h3>
<p><span style="font-size: 14pt;">You might not want several cells with formulae and cells with paths there. </span></p>
<p><span style="font-size: 14pt;">You can Copy and &#8216;Paste Values&#8217; the cells that include the formulae. Either into another location or directly over the top of the formulae. Then you can delete all the unwanted cells.</span></p>
<p><span style="font-size: 14pt;">To do this, click the paste button then &#8216;Paste Values&#8217; (or right click on the first cell and select &#8216;Paste Values&#8217;).</span></p>
<h3>What to do when filenames are pasted into a text file:</h3>
<p><span style="font-size: 14pt;">If you pasted into a text file, the only way is to manually edit the file name and path to leave only the file name. </span></p>
<p><span style="font-size: 14pt;">If you really have too many to edit, you could paste into excel, use my formula as above, and then copy that list of file names into a text file.</span></p>
<h2 id="how-to-copy-folder-names-into-excel">How to Copy-Paste Folder Names into Excel</h2>
<p><span style="font-size: 14pt;">We are going to walk you through the process so anyone can follow it step by step.</span></p>
<p><span style="font-size: 14pt;">If you know most of how to do this, you should be able to skim read just the highlights.</span></p>
<p style="padding-left: 40px;"><span style="font-size: 14pt;"><strong>If you are an expert</strong>, here it is, in brief:</span></p>
<ul>
<li><span style="font-size: 14pt;">Select to copy multiple folders.</span></li>
<li><span style="font-size: 14pt;">&lt;Shift&gt; + right click on a selected folder.</span></li>
<li><span style="font-size: 14pt;">Select &#8216;Copy as Path&#8217;</span></li>
<li><span style="font-size: 14pt;">&lt;Ctrl&gt; + &lt;v&gt; into Excel</span></li>
<li><span style="font-size: 14pt;">Use my formula to trim path.</span></li>
</ul>
<p style="padding-left: 40px;"><span style="font-size: 14pt;">Click here to <a href="#how-to-cut-folder-names-pasted-in-excel"><span style="text-decoration: underline;"><span style="color: #0000ff; text-decoration: underline;">jump direct to the formula</span></span></a> for a list of folders.<br /></span></p>
<p><span style="font-size: 14pt;">If that isn&#8217;t detailed enough, read on to see it step by step.</span></p>
<h3>Step 1 Select the folders you want to copy in your list of folders</h3>
<p><span style="font-size: 14pt;">You can select just one folder or multiple folder names.</span></p>
<p><span style="font-size: 14pt;">To select just one folder, just click on it.<br /></span></p>
<h4 id="how-to-copy-multiple-folder-names-into-excel">How to copy multiple folder names into Excel</h4>
<p><span style="font-size: 14pt;">There are many way to select multiple folders to get their names into MS Excel.</span></p>
<p><span style="font-size: 14pt;">For example, you can click and drag the mouse over the ones you want. </span></p>
<p><span style="font-size: 14pt;">It&#8217;s basically the same as shown above when selecting file rather than folders.</span></p>
<p><span style="font-size: 14pt;">You can hit <strong>&lt;Ctrl&gt; + &lt;a&gt;</strong>.</span></p>
<p><span style="font-size: 14pt;">The &#8216;a&#8217; is to select and copy all folder names (sub-directories) within any folder Windows 10 &#8211; that is hold down the &#8216;control&#8217; and tap the &#8216;A&#8217; key for the letter &#8216;a&#8217;.</span></p>
<p><span style="font-size: 14pt;">Alternatively, if you want a specific list of only a few of your sub-folder or folder names do this: </span></p>
<p><span style="font-size: 14pt;">Press &lt;Ctrl&gt; and click on each individual folder to select just all the folder names you want. You can click again to deselect one.</span></p>
<p><span style="font-size: 14pt;">I guess you get the picture and have your own preferred way (there are many more).</span></p>
<p><span style="font-size: 14pt;">For the special case of having to select from a <em>search</em> of specific folders see <a href="https://www.thetechmentor.com/posts/2-tricks-save-explorer-search-results-excel/" target="_blank" rel="noopener noreferrer"><span style="text-decoration: underline;"><span style="color: #0000ff; text-decoration: underline;">this article using File Explorer search results</span></span></a>.</span></p>
<p><span style="font-size: 14pt;">Next we show how to copy the folder names (not the folders with their actual files contained within).</span></p>
<h3>Step 2 Copy Names of Folders to Clipboard</h3>
<p><span style="font-size: 14pt;">We use a <strong>special way to copy your selected folders</strong>.</span></p>
<p><span style="font-size: 14pt;">Press <strong>&lt;Shift&gt; + Right-Click</strong>. </span></p>
<p><span style="font-size: 14pt;">To explain in painful detail, that means hold the &lt;Shift&gt; key and while still pressing it, you hover the mouse over any of your selected folder names (any folder will do if all folders are selected) and right click.</span></p>
<p><span style="font-size: 14pt;">This shows pop up menu that has what we need.<br /></span></p>
<p><span style="font-size: 14pt;">In this menu options list scan down to find “Copy as Path” to copy selected folders. See below for an example. Your menu could be diffent and Copy as Path could seem a long way down the list.<br /></span></p>
<div id="attachment_7587" style="width: 400px" class="wp-caption alignnone"><img aria-describedby="caption-attachment-7587" class="size-full wp-image-7587" src="https://www.thetechmentor.com/wp-content/uploads/2021/01/copy-folder-names-into-excel.jpg" alt="" width="390" height="390" srcset="https://www.thetechmentor.com/wp-content/uploads/2021/01/copy-folder-names-into-excel.jpg 390w, https://www.thetechmentor.com/wp-content/uploads/2021/01/copy-folder-names-into-excel-300x300.jpg 300w, https://www.thetechmentor.com/wp-content/uploads/2021/01/copy-folder-names-into-excel-150x150.jpg 150w, https://www.thetechmentor.com/wp-content/uploads/2021/01/copy-folder-names-into-excel-120x120.jpg 120w" sizes="(max-width: 390px) 100vw, 390px" /><p id="caption-attachment-7587" class="wp-caption-text"><span style="font-size: 14pt;">Copy folder names into excel with Copy as Path.</span></p></div>
<p><span style="font-size: 14pt;"> </span></p>
<p><span style="font-size: 14pt;">It will be there<em> if you have held down the shift key</em> when you clicked the right button. Check the image or the screen copy for how it should look in <span style="background-color: #ffff00;">Windows 10</span>.</span></p>
<p style="padding-left: 40px;"><span style="font-size: 14pt;"><span style="background-color: #00ffff;">Note:</span> In Windows 8 this pop-up menu will look a little different, but the shift right-click menu contains &#8216;Copy as Path&#8217;.</span></p>
<p style="padding-left: 40px;"><span style="font-size: 14pt;"><span style="background-color: #00ffff;">Note:</span> In Windows 7 or Vista, the menu can look simpler, but the &lt;Shift&gt; and right-click combo will still contain &#8216;Copy as Path&#8217;.</span></p>
<p><span style="font-size: 14pt;">To be clear, if you do not see ‘Copy as Path’ in your pop-up options, I remind you to hold &lt;Shift&gt; down when you click the right mouse button on a selected or highlighted folder.</span></p>
<p style="padding-left: 40px;"><span style="font-size: 14pt;"><span style="background-color: #ffff00;">TIP:</span> If you find you didn&#8217;t have the &lt;Shift&gt; key held down, simply hold shift now and right-click on one of your already selected folder names (away from the menu that already popped up) so that your folder selection remains&#8230; well&#8230; selected! It could save having to select multiple file names again. Although minor, it&#8217;s a great tip because I found I forgot the first few times when I started to apply it. Believe me, it is a pain when you have painstakingly picked out several in a big list of folders!<br /></span></p>
<p><span style="font-size: 14pt;">So we have the folder names on the computer &#8216;clip board&#8217;, next how to copy this list of folders into excel, to complete our copy paste combo.</span></p>
<h3>Step 3 Paste Folder information into Excel</h3>
<p><span style="font-size: 14pt;">I cover here how to copy all folder names into Microsoft Excel. But you can put them wherever you like, MS Word for example.<br /></span></p>
<p><span style="font-size: 14pt;">Select the Excel file and select where you want to paste. If starting a blank sheet, I suggest cell B2.<br /></span></p>
<p style="padding-left: 40px;"><span style="font-size: 14pt;"><span style="background-color: #ff0000;">Warning:</span> If you are not pasting into a blank Excel file, then be sure to avoid a location where you have other data etc.</span></p>
<p><span style="font-size: 14pt;">Press &lt;Ctrl&gt; + &lt;v&gt;. </span></p>
<p><span style="font-size: 14pt;">Yup, you guessed it, hold down the control key and then press the letter &#8216;v&#8217;.</span></p>
<p><span style="font-size: 14pt;">There are many other ways to paste.</span></p>
<p><span style="font-size: 14pt;">For example, click the icon with the image of the clipboard (often with Paste written under it).</span></p>
<p><span style="font-size: 14pt;">I often right click and then select paste.</span></p>
<h3>More than just a List of Folder Names?</h3>
<p style="padding-left: 40px;"><span style="font-size: 14pt;"><span style="background-color: #00ffff;">Note:</span> each cell will show the full path to the folders, not just the final sub-folder names! </span></p>
<p><span style="font-size: 14pt;">We next clean that up to leave only the folder names. You can skip this if you want a full list of all folder names to each folder location.</span></p>
<h3>Step 4 -Tidy up the list of Folder Names pasted into Excel</h3>
<p><span style="font-size: 14pt;">As you will now see, whether you have pasted a single folder or multiple folder names, they also come with the location of that folder.</span></p>
<p><span style="font-size: 14pt;">If you don&#8217;t have a big list of folders, it is pretty easy to manually edit them. Yes it might take a little time, but you will have completed your task to copy and paste a list of file names into Excel.</span></p>
<p><span style="font-size: 14pt;">Note that if you have a <strong>big list of folder names</strong> (or even a few and are a little lazy, or simply like to try new things) I have a brilliant secret formula that will cut out everything except the last part of the path leaving only the final (sub-) folder name. I&#8217;ll show that secret too!</span></p>
<p><span style="font-size: 14pt;">You can click in the Formula bar at the top of each cell in turn, then delete the unwanted file path, leaving only the name.</span></p>
<p><span style="font-size: 14pt;">Instead, I often use the function key &lt;F2&gt;.</span></p>
<p><span style="font-size: 14pt;">For that shortcut Just press &#8216;F2&#8217; near the top of your keyboard.</span></p>
<p><span style="font-size: 14pt;">Or, you can double-click on the excel cell and edit the text in the cell.</span></p>
<p><span style="font-size: 14pt;">Anyhow, you can select the unwanted part of the text before the file name itself, by clicking and dragging the mouse.</span></p>
<p><span style="font-size: 14pt;">True, you can put the cursor where you need and tap delete, delete, repeat, repeat! <img src="https://www.thetechmentor.com/wp-content/plugins/wp-edit/plugins/emoticons/img/smiley-laughing.gif" /></span></p>
<h3 id="how-to-cut-folder-names-pasted-in-excel">Special formula to Cut Pasted Folder names</h3>
<p><span style="font-size: 14pt;">This can work for you even if you are not familiar with Excel formulas.</span></p>
<p><span style="font-size: 14pt;">In that case, to use the formula unchanged, pasted the folder list into Excel at cell B2. You can start a new Excel sheet so there is nothing else in there.</span></p>
<p><span style="font-size: 14pt;">Copy from this website and Paste my PARTIAL formula below into Excel (I suggest Cell A1).</span></p>
<p style="padding-left: 40px;"><span style="font-size: 14pt;"><span style="background-color: #00ffff;">NOTE:</span> If you don&#8217;t want to retype the formula, you can download a free file that has the formula so you can copy and paste it as you need. The link below takes you to the section that has the download.</span></p>
<p style="padding-left: 40px;"><a href="#how-to-cut-filenames-pasted-in-excel"><span style="text-decoration: underline; font-size: 14pt;"><span style="color: #0000ff; text-decoration: underline;">Special formula to trim pasted filenames In Excel</span></span></a></p>
<p><span style="font-size: 16pt;">=TRIM(RIGHT(SUBSTITUTE(B1,</span></p>
<p><span style="font-size: 14pt;">Then continue to write the rest of the formula as<br /></span></p>
<p><img class="alignnone size-full wp-image-7585" src="https://www.thetechmentor.com/wp-content/uploads/2021/01/part-formula-filenames-in-excel.jpg" alt="" width="208" height="25" /></p>
<p style="padding-left: 40px;"><span style="font-size: 14pt;"><span style="background-color: #ffff00;">NOTE 1:</span> The formula is shown this way because you need to be sure you get the MS Excel formula quote marks into the formula. A good way to have this is to type it direct into Excel. If you copy and paste, sometimes you get a version of quote marks which will break the formula!</span></p>
<p style="padding-left: 40px;"><span style="font-size: 14pt;"><span style="background-color: #ffff00;">NOTE 2:</span> If you read both sections on <a href="#how-to-copy-file-names-into-excel"><span style="text-decoration: underline;"><span style="color: #0000ff; text-decoration: underline;">how to copy file names into Excel</span></span></a> and this one, you will see we can use this <strong>very same formula</strong> to <em>get only the last part</em>. I love this formula because you can get just the sub-folder name using the exact same formula!</span></p>
<p><span style="font-size: 14pt;">As stated above, to use my formula without any alterations, you will need to have pasted your folder list with paths into cell B1.</span></p>
<p><span style="font-size: 14pt;">If you are familiar with excel formulae, you can paste wherever you need and edit my formula to suit.</span></p>
<p><span style="font-size: 14pt;">That will be easy if you have a basic understanding with Excel formula cell references.</span></p>
<p><span style="font-size: 14pt;">Do not worry, you do not need to know much about formulas or understand this one in particular. Just paste it (preferred) or type it in (less preferred in case you mistype it).</span></p>
<p><span style="font-size: 14pt;">The formula to paste into Cell A1 should look the same as in the following image.<br /></span></p>
<div id="attachment_7588" style="width: 610px" class="wp-caption alignnone"><img aria-describedby="caption-attachment-7588" class="wp-image-7588 size-full" src="https://www.thetechmentor.com/wp-content/uploads/2021/01/how-copy-folder-names-into-excel.jpg" alt="how to copy folder names into excel" width="600" height="180" srcset="https://www.thetechmentor.com/wp-content/uploads/2021/01/how-copy-folder-names-into-excel.jpg 600w, https://www.thetechmentor.com/wp-content/uploads/2021/01/how-copy-folder-names-into-excel-300x90.jpg 300w, https://www.thetechmentor.com/wp-content/uploads/2021/01/how-copy-folder-names-into-excel-595xh.jpg 595w" sizes="(max-width: 600px) 100vw, 600px" /><p id="caption-attachment-7588" class="wp-caption-text"><span style="font-size: 14pt;">This formula is key to cut to the last sub-directory to copy folder names into Excel.</span></p></div>
<p><span style="font-size: 14pt;">Now you can copy and paste this formula next to every folder path in your list.</span></p>
<p><span style="font-size: 14pt;">For example, you can hover the mouse over the bottom right hand corner of the first cell with the formula in it. When it changes to a little cross, double click and excel will auto-fill the formula all the way down.</span></p>
<p><span style="font-size: 14pt;">Well, that is how to get a list of the folders in a directory in addition to how to extract folder names into Excel.</span></p>
<p><span style="font-size: 14pt;">If you want to see a list of <strong>all sub-folders</strong> in a directory you will need to do a search (which includes sub-folders) to find the ones you want first, and we covered that above under &#8216;Selection&#8217;.</span></p>
<h3 id="formula-in-your-language">Translating from another language?</h3>
<p><span style="font-size: 14pt;">If you are translating this article from another language, please note the formula will not work in an Excel version other than <em>English</em> Excel.</span></p>
<p><span style="font-size: 14pt;">For example, the Trim() function is different in other languages, such as SUPPRESPACE() in French.</span></p>
<p><span style="font-size: 14pt;">There is a handy site which can translate the above excel formula into your language, and it is called the <span style="text-decoration: underline; color: #0000ff;"><a style="color: #0000ff; text-decoration: underline;" href="https://en.excel-translator.de/translator/" target="_blank" rel="nofollow noopener noreferrer">Excel Translator</a></span>.</span></p>
<p><span style="font-size: 14pt;">You can use this site to find the equivalent function for each item in the formula. </span></p>
<p><span style="font-size: 14pt;">Just substitute them into your own formula.</span></p>
<h3>What next &#8211; Pasting Values to all Excel cells.</h3>
<p><span style="font-size: 14pt;">You probably only want the fold names, not several cells with formulae <em>and</em> cells with paths there.</span></p>
<p><span style="font-size: 14pt;">To remove those and just leave the folder names only, Copy and &#8216;Paste Values&#8217; the cells that include the formulae. Select to paste in a new location or the first cell at the top of the formulae. Then you can delete all the unwanted cells.</span></p>
<p><span style="font-size: 14pt;">To do this, click the paste button then &#8216;Paste Values&#8217; (or right click on the first cell and select &#8216;Paste Values&#8217; from the popup menu).</span></p>
<h2 id="copy-folder-file-names-excel">Summary</h2>
<p><span style="font-size: 14pt;">I&#8217;ve shown how to copy file names into Excel and how to copy folder names into Excel. Not only that, I included a neat Excel formula to cut down the entire path to only the filename or lowest level folder after exporting. Some FAQs follow.<br /></span></p>

<div class="schema-faq wp-block-yoast-faq-block">
<div id="faq-question-1665206811711" class="schema-faq-section"><span style="font-size: 14pt;"><strong class="schema-faq-question">How do I copy a list of only file names into Excel?</strong></span>
<p class="schema-faq-answer"><span style="font-size: 14pt;">To copy the list of file names rather than the files themselves, you need to &#8216;copy as path&#8217;. This option only becomes available when you right-click while holding down the shift key. When you paste into Excel, you will see the file path (directory structure) included. You need my formula to remove that automatically if you want only the filenames in Excel without manually editing each one.</span></p>
</div>
<div id="faq-question-1665207156653" class="schema-faq-section"><span style="font-size: 14pt;"><strong class="schema-faq-question">How do I copy a list of folder names to Excel?</strong></span>
<p class="schema-faq-answer"><span style="font-size: 14pt;">Highlight the folders you want. If there are many you can sort in the &#8216;Details&#8217; view, so they are all together. Then click the first and shift-click the last to highlight them all. you need to &#8216;copy as path&#8217;. This option only becomes available when you right-click while holding down the shift key. You need my formula to remove the preceding path if you want only the last sub-folder names in Excel.</span></p>
</div>
<div id="faq-question-1665207523528" class="schema-faq-section"><span style="font-size: 14pt;"><strong class="schema-faq-question">When I copy file names into Excel, how do I remove the file-path?</strong></span>
<p class="schema-faq-answer"><span style="font-size: 14pt;">When you paste into Excel, you will see the file path (directory structure) included. You can edit each one manually or for many files you need a formula to remove that automatically if you want only the filenames in Excel. You can download a simple file for free that contains the formula, so you don&#8217;t have to retype it.</span></p>
</div>
<div id="faq-question-1665207670039" class="schema-faq-section"><span style="font-size: 14pt;"><strong class="schema-faq-question">How do I copy ONLY the file name not the file?</strong></span>
<p class="schema-faq-answer"><span style="font-size: 14pt;">You need to &#8216;copy as path&#8217;. This option only becomes available when you right-click on your selection while holding down the shift key.</span></p>
</div>
<div id="faq-question-1665208421838" class="schema-faq-section"><span style="font-size: 14pt;"><strong class="schema-faq-question">How do I extract only the name from path in Excel?</strong></span>
<p class="schema-faq-answer"><span style="font-size: 14pt;">If you have many files or sub-folders, it can be extremely tedious to edit each one to remove the preceding file path. You can remove it automatically with a formula. You can download a free spreadsheet that contains that formula, so you don&#8217;t have to type it out.</span></p>
</div>
</div>



<div class="schema-faq wp-block-yoast-faq-block">
<div id="faq-question-1665256732793" class="schema-faq-section"><span style="font-size: 14pt;"><strong class="schema-faq-question">How can you extract the folder name from path in Excel?</strong></span>
<p class="schema-faq-answer"><span style="font-size: 14pt;">You can manually edit each cell to delete the path, which is okay for only a few. However, that is not practical for many folders. Alternatively, there is a unique formula which trims the name and path down to leave only the name of the last sub-folder level.</span></p>
</div>
</div>



<div class="schema-faq wp-block-yoast-faq-block">
<div id="faq-question-1696582528151" class="schema-faq-section"><strong class="schema-faq-question">I just want the file names on each cell of the Excel sheet, not the path</strong>
<p class="schema-faq-answer">You can strip the &#8216;path&#8217; from the list with a formula. My article shows the formula for removing the path automatically. If you don&#8217;t want to type it out you can download my free spreadsheet with the formula included.</p>
</div>
</div>
<p>The post <a rel="nofollow" href="https://www.thetechmentor.com/posts/copy-file-folder-names-into-excel/">Copy file and folder names into Excel (remove path automatically)</a> appeared first on <a rel="nofollow" href="https://www.thetechmentor.com">TheTechMentor.com</a>.</p>
<div class='yarpp-related-rss'>
<p>Related posts:</p><ol>
<li><a href="https://www.thetechmentor.com/posts/how-copy-all-file-names-in-folder/" rel="bookmark" title="How to copy all file names in a folder">How to copy all file names in a folder </a></li>
<li><a href="https://www.thetechmentor.com/posts/copy-multi-pdf-file-names-ms-excel/" rel="bookmark" title="Copy multiple PDF file names to Excel">Copy multiple PDF file names to Excel </a></li>
<li><a href="https://www.thetechmentor.com/posts/2-tricks-save-explorer-search-results-excel/" rel="bookmark" title="2 Tricks Save Explorer Search Results to Excel or App">2 Tricks Save Explorer Search Results to Excel or App </a></li>
</ol>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.thetechmentor.com/posts/copy-file-folder-names-into-excel/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
