<?xml version="1.0" encoding="windows-1252"?>
<node id="35235" title="How do I extract a file name from a path string" created="2000-10-04 08:28:56" updated="2005-08-10 08:50:35">
<type id="1857">
categorized question</type>
<author id="11732">
QandAEditors</author>
<data>
<field name="doctext">
I am using: 
&lt;CODE&gt;
open FILES, "dir /b /aa /s |" or die;
while(&lt;FILES&gt;)
{ 
   #process result
}
close FILES;
&lt;/CODE&gt;
On NT this gives me a list like:
&lt;CODE&gt;
C:\WINDOWS\INF\wordpad.inf
C:\WINDOWS\INF\wordpad.PNF
C:\WINDOWS\INF\WPIE3x86.INF
C:\WINDOWS\INF\WPIE3x86.PNF
. . .
&lt;/CODE&gt;

How do I split this string into two parts, the directory path and the filename?
</field>
<field name="parent_node">
1826</field>
<field name="reputation">
4</field>
</data>
</node>
