<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://wiki.twig.es/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.twig.es/index.php?action=history&amp;feed=atom&amp;title=Move_files_to_directory</id>
		<title>Move files to directory - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.twig.es/index.php?action=history&amp;feed=atom&amp;title=Move_files_to_directory"/>
		<link rel="alternate" type="text/html" href="https://wiki.twig.es/index.php?title=Move_files_to_directory&amp;action=history"/>
		<updated>2026-05-06T15:11:00Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.0</generator>

	<entry>
		<id>https://wiki.twig.es/index.php?title=Move_files_to_directory&amp;diff=4179&amp;oldid=prev</id>
		<title>George2: Created page with &quot;&lt;source lang=&quot;powershell&quot;&gt; $rootpath=&quot;c:\scripts\frances&quot; $destpath=&quot;c:\scripts\frances\output&quot; foreach($f in Get-Childitem $rootpath) {       foreach ($i in Get-childitem $f)...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.twig.es/index.php?title=Move_files_to_directory&amp;diff=4179&amp;oldid=prev"/>
				<updated>2018-08-03T14:37:15Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;source lang=&amp;quot;powershell&amp;quot;&amp;gt; $rootpath=&amp;quot;c:\scripts\frances&amp;quot; $destpath=&amp;quot;c:\scripts\frances\output&amp;quot; foreach($f in Get-Childitem $rootpath) {       foreach ($i in Get-childitem $f)...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;powershell&amp;quot;&amp;gt;&lt;br /&gt;
$rootpath=&amp;quot;c:\scripts\frances&amp;quot;&lt;br /&gt;
$destpath=&amp;quot;c:\scripts\frances\output&amp;quot;&lt;br /&gt;
foreach($f in Get-Childitem $rootpath)&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    foreach ($i in Get-childitem $f)&lt;br /&gt;
    {&lt;br /&gt;
&lt;br /&gt;
       if(TEst-Path $i -include *.trg)&lt;br /&gt;
       {&lt;br /&gt;
          echo($i.name + &amp;quot; file exists&amp;quot;)&lt;br /&gt;
          $b = $i.name&lt;br /&gt;
          write-host(&amp;quot;the name is $b&amp;quot;)&lt;br /&gt;
          $first = $b -Split('\.')&lt;br /&gt;
          write-host (&amp;quot;the first bit is &amp;quot; + $first[0])&lt;br /&gt;
          $name = $first[0]+&amp;quot;.csv&amp;quot;&lt;br /&gt;
          write-host $name&lt;br /&gt;
          Move-Item  -Path $rootpath\$name -Destination $destpath\$name&lt;br /&gt;
          Move-Item  -Path $rootpath\$b -Destination $destpath\$b&lt;br /&gt;
         exit&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>George2</name></author>	</entry>

	</feed>