[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



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.