Jonathan de Boyne Pollard
2010-03-18 05:39:27 UTC
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<blockquote cite="mid:hnobsp$2g1$***@news.eternal-september.org"
type="cite">
<p wrap="">I would like to move files and subdirectories to a
directory above <em>without</em> overwriting existing files.<br>
Is that possible and easy to do with a batch?<br>
</p>
</blockquote>
<p>It's another one-liner with some command interpreters:<br>
</p>
<blockquote>
<pre>move /r /s * ..\</pre>
</blockquote>
<p>In fact, it's a choice of one-liners, depending from whether one
wants the source directory hierarchy preserved in the target:<br>
</p>
<blockquote>
<pre>global ren * d:\target\*</pre>
</blockquote>
<p>See <a href="http://jpsoft.com./help/move.htm"><code>MOVE</code></a>,
<a href="http://jpsoft.com./help/ren.htm"><code>RENAME</code></a>, and <a
href="http://jpsoft.com./help/global.htm"><code>GLOBAL</code></a> for
details.</p>
</body>
</html>
<html>
<head>
<meta content="text/html; charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<blockquote cite="mid:hnobsp$2g1$***@news.eternal-september.org"
type="cite">
<p wrap="">I would like to move files and subdirectories to a
directory above <em>without</em> overwriting existing files.<br>
Is that possible and easy to do with a batch?<br>
</p>
</blockquote>
<p>It's another one-liner with some command interpreters:<br>
</p>
<blockquote>
<pre>move /r /s * ..\</pre>
</blockquote>
<p>In fact, it's a choice of one-liners, depending from whether one
wants the source directory hierarchy preserved in the target:<br>
</p>
<blockquote>
<pre>global ren * d:\target\*</pre>
</blockquote>
<p>See <a href="http://jpsoft.com./help/move.htm"><code>MOVE</code></a>,
<a href="http://jpsoft.com./help/ren.htm"><code>RENAME</code></a>, and <a
href="http://jpsoft.com./help/global.htm"><code>GLOBAL</code></a> for
details.</p>
</body>
</html>