Consultor Eletrônico



Kbase P86227: How to use the quoter.exe utility with directory names containing spaces?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   8/9/2004
Status: Unverified

GOAL:

How to use the quoter.exe utility with directory names containing spaces?

FACT(s) (Environment):

Windows

FACT(s) (Environment):

Progress 9.x

FIX:

The following sample code demonstrates a way to use the Progress quoter.exe utility when the directory names include spaces and blanks:

DEF VAR wPrefix AS CHAR INIT "C:\Documents and Settings\".
DEF VAR X AS INT INIT 2.
DEFINE VARIABLE cCommandLine AS CHARACTER NO-UNDO.

DEF VAR p1 AS CHAR.
DEF VAR p2 AS CHAR.
DEF VAR w1 AS CHAR.
DEF VAR w2 AS CHAR.

ASSIGN
p1 = QUOTER (wPrefix + "40622004.dat")
p2 = QUOTER(wPRefix + "40622004.q").

ASSIGN
w1 = QUOTER(TRIM(p1))
w2 = QUOTER(TRIM(p2)).

/* Debugging Only: Show various file names */
MESSAGE
"w1:" w1 "~n"
"w2:" w2 "~n"
"p1:" p1 "~n"
"p2:" p2
VIEW-AS ALERT-BOX INFO BUTTONS OK.


IF X = 1 THEN
cCommandLine = search("quoter.exe") + CHR(32) + p1 + CHR(32) + ">" + CHR(32) + p2.
ELSE
cCommandLine = search("quoter.exe") + CHR(32) + w1 + CHR(32) + ">" + CHR(32) + w2.

/* Debugging Only: Show the command line being executed */
MESSAGE cCommandLine
VIEW-AS ALERT-BOX INFO BUTTONS OK.

DOS SILENT VALUE(cCommandLine).