<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>When you want to copy a file into a folder, make sure you have a folder</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2009/11/26/9928891.aspx</link><description>Otherwise it may end up creating a file named after your folder.</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: When you want to copy a file into a folder, make sure you have a folder</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2009/11/26/9928891.aspx#9930744</link><pubDate>Tue, 01 Dec 2009 13:36:19 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9930744</guid><dc:creator>Scott</dc:creator><description>&lt;p&gt;Reminds me of an obscure similar problem I ran into back in the Win98 days. I was trying to install a program (cygwin, might have been), and I'd consistently get a failure when trying to create the file named &amp;quot;cdrom&amp;quot;. After days of trying to figure out why I couldn't create a file named &amp;quot;cdrom&amp;quot; anywhere, I realized I had real mode cdrom drivers installed, and had called the device &amp;quot;cdrom&amp;quot;. Thus the setup program was tripping over the reserved device name. It's always stuck in my mind as an example of what happens when users know a little too much for their own good ;)&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9930744" width="1" height="1"&gt;</description></item><item><title>re: When you want to copy a file into a folder, make sure you have a folder</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2009/11/26/9928891.aspx#9930228</link><pubDate>Mon, 30 Nov 2009 16:17:12 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9930228</guid><dc:creator>James Schend</dc:creator><description>&lt;p&gt;You guys don't have to keep offering solutions to the problem. Microsoft already solved it, that's why it's here on this blog.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9930228" width="1" height="1"&gt;</description></item><item><title>re: When you want to copy a file into a folder, make sure you have a folder</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2009/11/26/9928891.aspx#9929534</link><pubDate>Fri, 27 Nov 2009 23:41:55 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9929534</guid><dc:creator>Coleman</dc:creator><description>&lt;p&gt;@Teo,&lt;/p&gt;
&lt;p&gt;&amp;gt;one can use JPSoft's TCC cmd replacement&lt;/p&gt;
&lt;p&gt;Except now they have to make sure this &amp;quot;cmd replacement&amp;quot; is installed on every PC where this script is run, so now they have 2 problems. &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9929534" width="1" height="1"&gt;</description></item><item><title>re: When you want to copy a file into a folder, make sure you have a folder</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2009/11/26/9928891.aspx#9929456</link><pubDate>Fri, 27 Nov 2009 16:59:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9929456</guid><dc:creator>porter</dc:creator><description>&lt;p&gt;&amp;gt;&amp;gt; That wasn't so hard, was it?&lt;/p&gt;
&lt;p&gt;Except it didn't answer the question.&lt;/p&gt;
&lt;p&gt;NT4SP6,WIN2K,XP all do the complete path. DOS and OS2WARP don't, so when did mkdir start making the complete path?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9929456" width="1" height="1"&gt;</description></item><item><title>re: When you want to copy a file into a folder, make sure you have a folder</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2009/11/26/9928891.aspx#9929345</link><pubDate>Fri, 27 Nov 2009 10:20:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9929345</guid><dc:creator>Neil</dc:creator><description>&lt;p&gt;@porter&lt;/p&gt;
&lt;p&gt;mkdir /?&lt;/p&gt;
&lt;p&gt;That wasn't so hard, was it?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9929345" width="1" height="1"&gt;</description></item><item><title>re: When you want to copy a file into a folder, make sure you have a folder</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2009/11/26/9928891.aspx#9929292</link><pubDate>Fri, 27 Nov 2009 06:37:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9929292</guid><dc:creator>Teo</dc:creator><description>&lt;p&gt;Well, one can use JPSoft's TCC cmd replacement. Its version of built-in &amp;quot;copy&amp;quot; has 28 switches, works with (S)ftp, has exclusion lists, and when combined with another built-in &amp;quot;select&amp;quot;, has interactive mode where you choose what file to copy. Not to mention the TAB completion which works with hidden files, ***named streams*** (eat THAT, PowerShell) and does not kills the rest of the command line after the token you try to auto-complete.&lt;/p&gt;
&lt;p&gt;Btw, recently I tried to implement a recently fast copy algorithm, and boy, it is hard. I am on the verge of thinking it is *impossible*&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9929292" width="1" height="1"&gt;</description></item><item><title>re: When you want to copy a file into a folder, make sure you have a folder</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2009/11/26/9928891.aspx#9929272</link><pubDate>Fri, 27 Nov 2009 04:51:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9929272</guid><dc:creator>Ian Argent</dc:creator><description>&lt;p&gt;Wouldn't copy &amp;quot;\\INITECH\Defaults\Sample cover sheet.tps&amp;quot; &amp;quot;C:\TPS Cover Sheets\.&amp;quot; /Y have worked?&lt;/p&gt;
&lt;p&gt;(N/M - that won't create the non-existant directory, will it?)&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9929272" width="1" height="1"&gt;</description></item><item><title>re: When you want to copy a file into a folder, make sure you have a folder</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2009/11/26/9928891.aspx#9929255</link><pubDate>Fri, 27 Nov 2009 03:08:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9929255</guid><dc:creator>Gabe</dc:creator><description>&lt;p&gt;I would just always execute the mkdir command. If the directory doesn't exist, it will create it, otherwise it will print an error which will be ignored because it's running unattended in a batch file.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9929255" width="1" height="1"&gt;</description></item><item><title>re: When you want to copy a file into a folder, make sure you have a folder</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2009/11/26/9928891.aspx#9929234</link><pubDate>Fri, 27 Nov 2009 00:28:41 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9929234</guid><dc:creator>porter</dc:creator><description>&lt;p&gt;I've noticed that mkdir now acts like the POSIX &amp;quot;mkdir -p dir&amp;quot;, when did this change?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9929234" width="1" height="1"&gt;</description></item><item><title>re: When you want to copy a file into a folder, make sure you have a folder</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2009/11/26/9928891.aspx#9929223</link><pubDate>Thu, 26 Nov 2009 23:28:41 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9929223</guid><dc:creator>Miral</dc:creator><description>&lt;p&gt;I used to use &amp;quot;if not exist C:\somedir\nul md C:\somedir&amp;quot;, since I remember there being a problem with using the bare directory name in DOS (5/6, I think, maybe even Win95) -- they reported that it didn't exist because they were checking for file existence and it was a directory rather than a file. &amp;nbsp;But &amp;quot;nul&amp;quot; was a magic file that always existed in every directory, so this got around the problem.&lt;/p&gt;
&lt;p&gt;Sadly this doesn't work in NT; &amp;quot;nul&amp;quot; is considered to never exist, so it will always try to create the directory even if it's already there. &amp;nbsp;(Basically the opposite problem.) &amp;nbsp;But fortunately now the direct comparison works.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9929223" width="1" height="1"&gt;</description></item></channel></rss>