guru wrote:
>
> folder F:\Testing\loc\
>
> Contains around 300 files
>
> I have to pass these files as parameter to one perl script .pl,
> where these files are processed( opened and read).
>
> Alg:
>
> take each file and concatenate them to a list
>
> like:
>
> while($filename = readdir(DIR))
> {
> $list .= $filename;
> }
>
> At the end, the list contains 300 file names.
>
> When I pass this as parameter to .pl file in windows it is throwing
> error:
>
> "Windows cannot access the specified device, path or file. You may not
> have the appropriate permission
> to access the item."
Can it possibly be that there is a space in one or more of the files? In
that case you may want to try:
my $list = '"' . join('" "', grep !/^\.{1,2}/, readdir DIR) . '"';
--
Gunnar Hjalmarsson
Email:
http://www.gunnar.cc/cgi-bin/contact.pl