• COPY_FILE

    From Willowolf@VERT/WOLFGROT to All on Tuesday, January 08, 2002 22:46:00
    I would like to copy my old auto.msg file to a file called auto.old. I am having trouble with the COPY_FILE function in Baja. I don't understand how to set up the variables correctly <str_var>. I know you set a variable with STR A, or STR B, etc, and then SETSTR B "%jmsgs\auto.msg" is how I have tried to set the path and file for the COPY_FILE command. I have read the Documentation for Baja, but can't figure it out. How do I copy a file in Baja from one file to another file, the copied having a different file name than the original?

    I have no programming experience, and help or examples would be appreciated.

    Thanks,
    \\/

    ---
    þ Synchronet þ Wolf Grotto = Las Vegas, Nevada USA = wolfgrotto.darktech.org
  • From Digital Man@VERT to Willowolf on Wednesday, January 09, 2002 06:10:45
    RE: COPY_FILE
    BY: Willowolf to All on Wed Jan 09 2002 06:46 am

    I would like to copy my old auto.msg file to a file called auto.old. I having trouble with the COPY_FILE function in Baja. I don't understand how set up the variables correctly <str_var>. I know you set a variable with ST A, or STR B, etc, and then SETSTR B "%jmsgs\auto.msg" is how I have tried to set the path and file for the COPY_FILE command. I have read the Documentat for Baja, but can't figure it out. How do I copy a file in Baja from one fi to another file, the copied having a different file name than the original?

    I have no programming experience, and help or examples would be appreciated.

    str source destination
    # use forward-slash path
    set source "%jmsgs/auto.msg"
    set destination "%jmsgs/auto.old"
    copy_file source destination
    if_false
    print "Failed."
    else
    print "Successful."
    end_if

    -Rob

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Willowolf@VERT/WOLFGROT to Digital Man on Wednesday, January 09, 2002 10:58:00
    [Reply to]: COPY_FILE
    [Typed by]: Digital Man to Willowolf on Wed Jan 09 2002 02:10 pm

    str source destination
    # use forward-slash path
    set source "%jmsgs/auto.msg"
    set destination "%jmsgs/auto.old"
    copy_file source destination
    if_false
    print "Failed."
    else
    print "Successful."
    end_if

    -Rob

    Thanks Rob, I appreciate it.

    \\/

    ---
    þ Synchronet þ Wolf Grotto = Las Vegas, Nevada USA = wolfgrotto.darktech.org