[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Problem Using CALL to DOS Copy using Wildcards
- Subject: Re: Problem Using CALL to DOS Copy using Wildcards
- From: Raj Amoli <rajkamoli@HOTMAIL.COM>
- Date: Tue, 2 Apr 2002 16:02:24 -0700
David:
Just try it without using 'WAIT' in the command. It might work.
Raj
>From: "Chitty, David" <DPChitty@HOMESIDE.COM>
>Reply-To: sqr-users@list.iex.net
>To: SQR-USERS@list.iex.net
>Subject: Re: Problem Using CALL to DOS Copy using Wildcards
>Date: Tue, 2 Apr 2002 14:51:09 -0500
>MIME-Version: 1.0
>Received: from [66.179.72.105] by hotmail.com (3.2) with ESMTP id
>MHotMailBE73596900C34004311142B34869F6A30; Tue, 02 Apr 2002 12:03:08 -0800
>Received: from list.iex.net (list.iex.net [66.179.72.105])by list.iex.net
>(8.11.1/8.11.1) with ESMTP id g32Jd1H19558;Tue, 2 Apr 2002 12:39:01 -0700
>(MST)
>Received: from LIST.IEX.NET by LIST.IEX.NET (LISTSERV-TCP/IP release 1.8d)
>with spool id 833995 for SQR-USERS@LIST.IEX.NET; Tue, 2 Apr 2002
>12:38:59 -0700
>Received: from smtp2.homeside.com ([12.27.152.125]) by list.iex.net
> (8.11.1/8.11.1) with ESMTP id g32JcuH19546 for
><sqr-users@list.iex.net>; Tue, 2 Apr 2002 12:38:57 -0700 (MST)
>Received: by hslnt98jax.homeside.com with Internet Mail Service
>(5.5.2653.19) id <HYXR4R7D>; Tue, 2 Apr 2002 14:51:10 -0500
>From owner-sqr-users@list.iex.net Tue, 02 Apr 2002 12:05:09 -0800
>X-Mailer: Internet Mail Service (5.5.2653.19)
>Message-ID:
><4A2CA05A2E84D511A2ED0008C791FB3A37CD7F@hslnt94jax.homeside.com>
>Sender: "Discussion of SQR, Brio Software's database reporting language"
> <SQR-USERS@list.iex.net>
>
>The copy works if I code the full file name as in Prasanna's example.
>However, when I use the wildcard because I could have one to many files
>(number and names unknown except for extension), the copy will not work.
>
>For example, the following will work:
>
> let $copy_command = 'copy ' || 'c:\temp\WO196808.POS ' || $InputFile
> call system using $copy_command #copy_status WAIT
>
>but the following will not work:
>
> let $copy_command = 'copy ' || 'c:\temp\*.POS ' || $InputFile
> call system using $copy_command #copy_status WAIT
>
>I tried Prasanna's idea of double-quotes (below is a sample) but without
>success. I believe the key is getting the system to accept the wildcard.
>
> let $copy_command = getenv('COMSPEC') || ' /c copy ' ||
>'""c:\temp\*.POS""
>""c:\temp\hlnabchs.pos""'
>
>I also tried Daniel Mueller's suggestion of using the /Y (and even /-Y)
>parameter of the cmd.exe. Neither worked. The error I am receiving is as
>follows (you can see the expanded command as well):
>
> Copy Command: C:\WINNT\system32\cmd.exe /c /y copy c:\temp\*.POS
>c:\temp\hlnabchs.pos
> Copy Status: 255.000000
>
>
>Dave Chitty
>
>
> -----Original Message-----
> From: Prasanna Menta [SMTP:pmenta@umuc.edu]
> Sent: Tuesday, April 02, 2002 2:24 PM
> To: sqr-users@list.iex.net
> Subject: Re: Problem Using CALL to DOS Copy using Wildcards
>
> Hello David,
> This is an example of call system code to merge two files, you are
> missing the quotes, see if this is of use to you
> let $merge = getenv('COMSPEC') || ' /C copy ' ||
>'""C:\TEMP\FILE1""
>+
> ""C:\TEMP\file2"" ""C:\TEMP\FILE3""'
> call system using $merge #status
> Thanks
> Prasanna
> "Chitty, David" wrote:
> >
> > I am issuing a CALL in an SQR to copy multiple files
>into
>one file. The
> > command works fine from the DOS prompt. It also works
>from the SQR if I
> > provide the full name for one of the files. However,
>when
>I use the
> > wildcard (WO*.POS)to reference all of the files, I
>receive
>an error.
> >
> > The program code is as follows:
> >
> > let $InputFile = 'c:\temp\hsnabchs.POS'
> > let $copy_command = getenv('COMSPEC') || ' /c copy '
>||
>'c:\temp\WO*.POS '
> > || $InputFile
> >
> > call system using $copy_command #copy_status WAIT
> >
> > I also tried replacing copy with xcopy (the rest of the
>command line was
> > left as is). It accepted the command but prompted me
>with
>a pop-up window
> > (which I don't want) requesting an F or D to indicate
>whether a file or
> > directory was being created.
> >
> > Any ideas?
> >
> > Dave Chitty
>
>
>This message may contain confidential information. We provide customer
>information to others only under certain circumstances, and based on
>representations that each applicable customer has authorized the
>disclosure.
>If any person makes a false or misleading representation to obtain customer
>information, that person may have committed a federal crime, and we may
>report any such incidence to the proper authorities. If you receive this in
>error, please notify the sender by reply fax or email and delete this
>message. If you properly received this message, you may use and distribute
>it only in accordance with our instructions and applicable law. HomeSide
>and it's affiliates do not represent, warrant or guarantee that the
>integrity of this communication has been maintained nor that the
>communication is free of errors, viruses or interference.
_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail.
http://www.hotmail.com