"Nishi Bhonsle" schreef:
> Can you please tell me how to modify the above program to ignore the
> "." and "..", so that they donot get printed in C:/filelist.txt ?
Since you want only files, see "perldoc -f -f".
--
Affijn, Ruud
"Gewoon is een tijger."
--
To unsubscribe, e-mail: [EMAIL PROT
The most direct way I can think of would be to simply open the file
again and read each line writing it to another file exactly as you want.
I'm still rather inexperienced with perl myself so I wouldn't know
off-hand how to do this exactly.
Mathew
Nishi Bhonsle wrote:
> Mathew:
>
> Thanks. I m
Nishi Bhonsle wrote:
> I was able to writeout the files on a filesystem to a file C:/filelist.txt
> using the program -
>
> $path = "$ARGV[0]";
> opendir ( DIR, $path ) or die "Can't open $path: $!";
> while(defined($DIR = readdir DIR))
> {
> push(@array_A,$DIR)
> }
> closedir DIR;
>
I was able to writeout the files on a filesystem to a file C:/filelist.txt
using the program -
$path = "$ARGV[0]";
opendir ( DIR, $path ) or die "Can't open $path: $!";
while(defined($DIR = readdir DIR))
{
push(@array_A,$DIR)
}
closedir DIR;
open(FILE,">c:/filelist.txt");
foreach $y
Nishi Bhonsle wrote:
> Hi:
>
> Can you please help me write a perl script that takes the files from a
> directory and spits out the filenames into a file.
> say.
> I have a file structure on a file system such as
> C:\Temp\one
> C:\Temp\two
> C:\Temp\one\oneone
> C:\Temp\one\onetwo
> C:\Temp\one\o