Re: Saving a file to a users desktop.

From: Sietse Wijnker (sietse.wijnker_at_ATsw-software.nl)
Date: 11/24/04


Date: Wed, 24 Nov 2004 15:55:49 +0100

Hi Steve,

> Fname=Fname+"\"+"aodbals.xls"

Take a look at the ADDBS() function. If the folder already contains a
backslash at the end you'll get something like
c:...\foldername\\aodbals.xls
with the ADDBS() that wouldn't occur. it only adds a backslash when it's not
there.

Furthermore, i would use a header file or DEFINE's for readablity of your
code. When you look at your code six months from now you might know that it
returs a file-path onto the desktop, but then again you might not:

#DEFINE CSIDL_DESKTOPDIRECTORY 0x0010

o=NEWOBJECT("_commonfolder", HOME() + "ffc\_system.vcx")
Fname = ADDBS(o.getfolder(CSIDL_DESKTOPDIRECTORY)) + "aodbals.xls"

For more values you can pass to the GetFolder method:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/enums/csidl.asp

> I can do this on Win98 easily:
> EXPORT TO c:\windows\desktop\aodbal.xls TYPE xls
You might want to use the GETENV() function to retrieve the path to the
windows folder. What if windows is installed on the D drive?
EXPORT TO (ADDBS(GETENV('windir')) + 'desktop\aodbal.xls' TYPE xls

BTW, the requirements to use the GetFolder method in the _system.vcx (using
the SHGetFolderPath() API call):
      Minimum operating systems Windows 95 with Internet Explorer 5.0,
Windows 98 with Internet Explorer 5.0, Windows 98 Second Edition (SE),
Windows NT 4.0 with Internet Explorer 5.0, Windows NT 4.0 with Service Pack
4 (SP4)

Regards,
Sietse Wijnker



Relevant Pages

  • Re: More died on open command (from 55103)
    ... I'm working with Activestate Activeperl 5.6 on a Windows ... > # Open the input folder ... This won't work because the backslash will escape the dollar sign. ...
    (perl.beginners)
  • Re: recover compacted folders
    ... Because of this tendency of attachments to infect, ... , then wasted space is generated in that file, and the folder must be ... Windows 2000 and Windows XP. ... Windows XP Service Pack 2 Resources for IT Professionals ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • Re: inbox mostly not open
    ... messages to another folder. ... > When I open Outlook Express it's open automatikly the Inbox. ... Turn off email scanning in your antivirus software. ... themselves (if you have the latest security updates from Windows Update) ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • Re: OE & SP2 missing Local Folders
    ... , then wasted space is generated in that file, and the folder must be ... Turn off email scanning in your antivirus software. ... Windows 2000 and Windows XP. ... Windows XP Service Pack 2 Resources for IT Professionals ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • Re: Lost Emails Information During "Compacting" of Folders
    ... , then wasted space is generated in that file, and the folder must be ... Options | Maintenance for each Identity you have, and then compact manually ... Turn off email scanning in your antivirus software. ... Windows 2000 and Windows XP. ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)