<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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:media="http://search.yahoo.com/mrss/" 
	>
<channel>
	<title>
	Comments on: How to Create a Folder If Not Exists in PowerShell?	</title>
	<atom:link href="https://www.spguides.com/create-folder-if-not-exists-using-powershell/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.spguides.com/create-folder-if-not-exists-using-powershell/</link>
	<description>Learn SharePoint, Power Platform, SPFx, etc, SharePoint training courses</description>
	<lastBuildDate>Wed, 26 Mar 2025 10:50:18 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.5</generator>
	<item>
		<title>
		By: J		</title>
		<link>https://www.spguides.com/create-folder-if-not-exists-using-powershell/#comment-699</link>

		<dc:creator><![CDATA[J]]></dc:creator>
		<pubDate>Wed, 01 Jun 2022 23:25:39 +0000</pubDate>
		<guid isPermaLink="false">https://www.sharepointsky.com/?p=798#comment-699</guid>

					<description><![CDATA[Thank you for this.  
I would suggest one change by adding an additional variable for the -Path so the script can be quickly used anywhere with just changing the variables at the top.
 
$folderName = (Get-Date).tostring(&quot;dd-MM-yyyy&quot;)
$root=&quot;E:Desktop&quot;
$path=$Root+$folderName
    if (!(Test-Path $Path))
    {
    New-Item -itemType Directory -Path $root -Name $FolderName
    }
    else
    {
    write-host &quot;Folder already exists&quot;
}]]></description>
			<content:encoded><![CDATA[<p>Thank you for this.<br />
I would suggest one change by adding an additional variable for the -Path so the script can be quickly used anywhere with just changing the variables at the top.</p>
<p>$folderName = (Get-Date).tostring(&#8220;dd-MM-yyyy&#8221;)<br />
$root=&#8221;E:Desktop&#8221;<br />
$path=$Root+$folderName<br />
    if (!(Test-Path $Path))<br />
    {<br />
    New-Item -itemType Directory -Path $root -Name $FolderName<br />
    }<br />
    else<br />
    {<br />
    write-host &#8220;Folder already exists&#8221;<br />
}</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
