Liza Das wrote: > To the experts, > > I have an existing script to unzip encrypted files that I wasn't passing any > variables to. > I am now modifying it to pass it different values so that it can be used by > anyone, instead > of hardcoding the information. > > In the below excerpt, I'm populating my variables then trying to get a list > of all > the files from the path I pass to it. The problem is the @filelist. > The dir command is not working and I get the following message: > "The filename, directory name, or volume label syntax is incorrect." > > The @filelist should show me: > xxx.ZIP > xxx.ZIP > > ---------------------------------------------------- > $sourcedir = shift (@ARGV); > $destdir = shift (@ARGV); > $password = shift (@ARGV); > $newfile = glob (@ARGV); > > # my @filelist = `dir `.$sourcedir.$newfile.` /b`; > my @filelist = `dir .$sourcedir.$newfile. /b`; # dir N:\Test\*.ZIP /b
# Assuming : use strict; use warnings; # Assuming for example : my $sourcedir = 'c:\temp'; my $newfile = '*.txt'; # or similar. This may work: my @filelist = `dir /b $sourcedir\\$newfile`; # if not, try this: my @filelist = `D:\\windows\\system32\\cmd.exe /C dir /b $sourcedir\\$newfile`; > ---------------------------------------------------- What does your invocation line look like ? -- ,-/- __ _ _ $Bill Luebkert Mailto:[EMAIL PROTECTED] (_/ / ) // // DBE Collectibles Mailto:[EMAIL PROTECTED] / ) /--< o // // Castle of Medieval Myth & Magic http://www.todbe.com/ -/-' /___/_<_</_</_ http://dbecoll.tripod.com/ (My Perl/Lakers stuff) _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs