I have a rename and copy routine that stores a csv file once processed. It
creates a unique name then stores it to the appropriate direct. Code pasted
below, hope it helps. Note there are no spaces in the date as it won't work
if there is.
-- Rename CSV to appropriate file
SET VAR vrandom = pond_id IN wqimport WHERE COUNT = 2
SET VAR vrandomt = (CTXT(.vrandom))
SET VAR vday INTEGER = (IDAY(#DATE))
SET VAR vmon INTEGER = (IMON(#DATE))
SET VAR vyear INTEGER = (IYR4(#DATE))
SET VAR vrenfile TEXT +
=
(.vpick+(CTXT(.vday))+'-'+(CTXT(.vmon))+'-'+(CTXT(.vyear))+'-'+.vrandomt+'.CSV')
--Rename file
RENAME .vfile &vrenfile
-- Move file
SET VAR v1 TEXT = (CVAL('CURRDIR'))
SET VAR v1 = (.v1+'\wqdata')
COPY &vrenfile &v1
--Remove file
DELETE &vrenfile
CLEAR VAR vmon vyear vday vrandom vrenfile vrandomt
RETURN
On Tue, Jun 27, 2023 at 4:49 AM Nicky Avery <[email protected]> wrote:
>
>
> Jim,
>
> On 26/06/2023 15:01, 'jim schmitt' via RBASE-L wrote:
>
> The command is: COPY C:\UBILL\*.* &VF_TO
>
>
> I think you have lost a chunk of code and a period. You're trying to get
> COPY to execute an ampersand variable and I don't believe it will. However,
> if you put in a period between the & and VF_TO, I think you will be in good
> shape.
>
> SET VAR VF_TO TEXT = ('COPY C:\UBILL\*.*' *& .*VF_TO)
> &VF_TO
>
> Nicky
>
>
>
> --
> For group guidelines, visit
> http://www.rbase.com/support/usersgroup_guidelines.php
> ---
> You received this message because you are subscribed to the Google Groups
> "RBASE-L" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rbase-l/571540a1-00c7-25f5-19ed-b60cca353f1b%40wwavs.com
> <https://groups.google.com/d/msgid/rbase-l/571540a1-00c7-25f5-19ed-b60cca353f1b%40wwavs.com?utm_medium=email&utm_source=footer>
> .
>
--
Regards
Tony
--
For group guidelines, visit
http://www.rbase.com/support/usersgroup_guidelines.php
---
You received this message because you are subscribed to the Google Groups
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/rbase-l/CABnhDAQn_jwDL%2BhuF%2BE2Y6Y_9XM6RjZUVhGHQ7_4%3DLwH-Lk1fQ%40mail.gmail.com.