Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: was unexpected at this time.  (Read 15403 times)

0 Members and 1 Guest are viewing this topic.

veer b singh

  • Guest
was unexpected at this time.
« on: May 13, 2009, 01:26:31 AM »
I do not use command prompt often so i dont know much about command execution

recently i wrote a batch file(gsm) that copies a file from remote server and rename it

then i use sql loader to load it in oracle data base

set t=%date:=%
ren todaycaf todaycaf%t%
net use y: \\10.8.88.80\nwa\gsm
xcopy "y:\GSM PREPAID REPORT_%t%_*.*"  "C:\Documents and Settings\Veer.Singh.IN\Desktop\PPAD OPS\PPAD OPS\GSM Prepaid CAF"
ren "GSM PREPAID REPORT_%t%_*.*" todaycaf.txt
sqlldr smplfy1317/[email protected] control =c:/gsm.ctl

the problem while executing this file is
that i get error as

=%
 was unexpected at this time.
gsm was unexpected at this time.

Batcher



    Rookie

    Thanked: 5
    Re: was unexpected at this time.
    « Reply #1 on: May 13, 2009, 01:42:55 AM »
    Change the first row to:

    Code: [Select]
    set t=%date/=%

    Dusty



      Egghead

    • I could if she would, but she won't so I don't.
    • Thanked: 75
    • Experience: Beginner
    • OS: Windows XP
    Re: was unexpected at this time.
    « Reply #2 on: May 13, 2009, 02:54:12 AM »
    Code: [Select]
    Set t=%date:/=%  or if the separator is a colon
    Code: [Select]
    Set t=%date::=%
    One good deed is worth more than a year of good intentions.