<?xml version="1.0" encoding="windows-1252"?>
<node id="1008094" title="Re: How to get full path name in windows?" created="2012-12-10 07:47:03" updated="2012-12-10 07:47:03">
<type id="11">
note</type>
<author id="190859">
bart</author>
<data>
<field name="doctext">
If you're just interested in "*.txt" files in one directory, I recommend to forego using [readdir] and friends, and go straight to [doc://glob].

&lt;c&gt;
@txt_files = glob qq("C:\\Users\\Me\\Desktop\\Cluster1\\*.txt");
&lt;/c&gt;
&lt;p&gt;Unlike [readdir], [glob] returns the full path in the same format as you passed as an argument: absolute path in yields absolute path out; relative path in (relative to the current working directory of perl which you can change with [chdir]) yields relative path out.

&lt;p&gt;Note that if (and only if) your $dirname contains spaces, then the double quotes are required. You don't have to put them around the whole path-with-wildcards, replacing every single space with &lt;c&gt;qq(" ")&lt;/c&gt; will work, too.
</field>
<field name="root_node">
1007994</field>
<field name="parent_node">
1007994</field>
</data>
</node>
