Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Invalid path or filename
Message
From
08/07/2012 07:17:30
 
 
To
08/07/2012 06:59:42
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows 7
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01547814
Message ID:
01547816
Views:
38
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform