Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Invalid path or filename
Message
De
08/07/2012 07:17:30
 
 
À
08/07/2012 06:59:42
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows 7
Database:
Visual FoxPro
Divers
Thread ID:
01547814
Message ID:
01547816
Vues:
40
thank you for reply
i try it same error
SET DEFAULT TO C:\dept
a=TRANSFORM(dtos(DATE()-1), "@R 9999_99")
lcPath="c:\dept\"+a
set default to (lcPath)&& erorr message
gcDelimName = ALIAS( ) + '.xls'&& or xlsx
gcDelimfile = forcepath(m.gcDelimName,'c:\dept\&a')

IF !EMPTY(m.gcDelimFile)  
  COPY  TO (m.gcDelimFile)  TYPE XLS
ENDIF
>>hi all,
>>
>>i use to this code at office 2003 it works , i try it with office 2007. error message
>>invalid path or filename
>>
>>SET DEFAULT TO C:\dept
>>a=str(YEAR(DATE()))+"_"+TRANSFORM(MONTH(DATE())-1)
>>SET DEFAULT TO C:\dept\&a
>>gcDelimName = ALIAS( ) + '.xlsx'
>>gcDelimfile = forcepath(m.gcDelimName,'c:\dept\&a')
>>IF !EMPTY(m.gcDelimFile)  
>>  COPY TO (m.gcDelimFile) type xls& i try xlsx,xl5,and csv
>>ENDIF
>>
>>
>>thanks
>
>Your variable a contains " 2012_6" (with six spaces), because str() without extra parameters. First off, you should
>
a=TRANSFORM(dtos(DATE()-1), "@R 9999_99")
>and the Set default to then sees, after macro is expanded,
>
set default to c:\dept\      2012_7
>and then stops parsing at the first space, then doesn't know what to do with the 2012_7 and gives you the error.
>Second, in some cases you may want to have spaces or other characters in your path name - then use the name expression.
>
lcPath="c:\dept\"+a
>set default to (lcPath)
>That would have worked even if your path contained spaces, provided that the path exists.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform