Well, I remember reading a fairly long bit on why the system call had
trouble with long file names and such.  It suggested a couple ways to get
around some of the issues of passing parameters intentionally and
unintentionally (long file names).  But the long and short of it was that
there wasn't a good way around *all* the problems with system(), and qx() is
the same functionality.  The only reliable way I've found to call external
programs is with Win32::Process::Create.

=======================================================
Andy Webb            [EMAIL PROTECTED]      www.swinc.com
Simpler-Webb, Inc.   Austin, TX            512-322-0071
-- Way to go USPS Cycling Team and Lance Armstrong!! --
======================================================= 

-----Original Message-----
From: Tai [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 14, 2001 2:51 PM
To: [EMAIL PROTECTED]
Subject: Re: qx usage?


Hi,
        Thanx for all who wrote.  Just to FYI, this is running on NT4,
service pack 6a.  $HASHFunc and $filename is actually pulled in when
the program runs, $HASHFunc from the config file and $filename by
fcheck walking the directory tree.  I wrote it in to show what
problem I was seeing.  Should have been more clear, my apologies.

        If you do a print "$HASHFunc" or "$filename" or "shortname",
they all print out correctly... 

        Still no answers, but thanx to those who sent suggestions.

-Tai

Tai wrote:
> 
> Hi,
>         Trying to muck with the FCheck (a file integrity checker),
> and due to my poor understanding of qx and the various '`" and such,
> I'm tearing my hair out.
> 
> $HASHFunc = "C:\\fcheck\\md5sum.exe";
> $filename = "c:\\temp\somelongfilename.txt";

$filename = "c:\\temp\\somelongfilename.txt";  # typo :) :)
 
> $shortname = Win32::GetShortPathName($filename);
> 
> $x = qx("$HASHFunc $shortname");
> 
>         Two problems.  First is that I can't make the qx call with
> $filename, have to use $shortname - why?  Second is that if I use
> $filename = "c:\\temp\some&longfilename", qx still don't want to
> work, saying that it can't find "some&l~1" - apparently not liking
> the "&" in the name.
> 
>         How do I work around both of these?  Thanx for any help.
> 
> -Tai
> _______________________________________________
> Perl-Win32-Admin mailing list
> [EMAIL PROTECTED]
> http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin

Reply via email to