Page 1 of 1 1
Topic Options
#3638 - 2000-07-28 06:27 AM Proper Syntax for long file names
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11628
Loc: CA
I am fairly new to KiXtart and I have a question concerning proper syntax for long files names. I can't seem to get it right.

Some portions seem to work then not. The code below has been rewritten back and forth for testing. Can someone please point out where/what I am doing wrong. Hopefully an answer from an experienced user will be faster then me rewriting and testing over and over. Thanks for any and all help.

SELECT
;*** Parent Server WDID11
CASE ((SUBSTR(@IPADDRESS0,1,11)="139.104. 9")) or ((SUBSTR(@IPADDRESS0,1,11)="139.104. 10"))
SMALL
CLS
AT (2,5) "Changing your NAV parent server to WDID11"
;*** Parent Server WDIT09
CASE ((SUBSTR(@IPADDRESS0,1,11)="139.104.117")) or ((SUBSTR(@IPADDRESS0,1,11)="139.104. 5"))
SMALL
CLS
; AT (2,5) "Changing your NAV parent server to WDIT09"
IF @INWIN=2
AT (4,5) "Hello - Win9x portion of script"
USE w: /DELETE /PERSISTENT
USE w: "\\WDIT09\VPHOME"
SHELL "COMMAND.COM /e:1024 /c IF NOT EXIST C:\PROGRA~1\Norton~1 MD "C:\PROGRA~1\Norton Antivirus" >NUL"
SHELL "COMMAND.COM /e:1024 /c copy w:\grc.dat "C:\PROGRAM FILES\Norton Antivirus" >NUL"
USE w: /DELETE /PERSISTENT
ELSE
AT (4,5) "Hello - WinNT portion of script"
USE w: /DELETE /PERSISTENT
USE w: "\\WDIT09\VPHOME"
SHELL "CMD.EXE /e:1024 /c IF NOT EXIST C:\PROGRA~1\NAVNT MD C:\PROGRA~1\NAVNT >NUL"
SHELL "CMD.EXE /e:1024 /c copy w:\grc.dat c:\progra~1\navnt >NUL"
USE w: /DELETE /PERSISTENT
ENDIF

CASE ((SUBSTR(@IPADDRESS0,1,11)="139.104. 21")) or ((SUBSTR(@IPADDRESS0,1,11)="139.104. 24")) or ((SUBSTR(@IPADDRESS0,1,11)="139.104. 45")) or ((SUBSTR(@IPADDRESS0,1,11)="139.104. 46"))
SMALL
CLS
AT (2,5) "Your parent server should be WDID16"
CASE ((SUBSTR(@IPADDRESS0,1,11)="139.104.241"))
SMALL
CLS
AT (2,5) "Yes it equals 241"
CASE 1
SMALL
CLS
AT (1,2) "It appears your IP Address range is not in my list."

ENDSELECT


Top
#3639 - 2000-07-28 10:59 AM Re: Proper Syntax for long file names
Anonymous
Unregistered


After a quick look I'd just say that for SHELL commands it's better to start and end with single quotes - this leaves the double quotes for long directory names.
Also, why use a shell to make a directory?
Kix can do that just fine...

IF EXIST ("C:\PROGRA~1\Norton~1")=0 MD "C:\PROGRA~1\Norton Antivirus" ENDIF
[not tested - good luck!]


Ramon

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 657 anonymous users online.
Newest Members
M_Moore, BeeEm, min_seow, Audio, Hoschi
17883 Registered Users

Generated in 0.119 seconds in which 0.085 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org