File names with spaces difficulty
Jan Schenkel
janschenkel at yahoo.com
Mon Aug 3 04:55:35 EDT 2009
--- On Mon, 8/3/09, Jim Ault <jimaultwins at yahoo.com> wrote:
> I know this has been answered before
> but I cannot find it in the archives.
>
> (on a Mac OSX 10.5 system)
> I am receiving files via FTP that have several spaces and
> cannot remember how to do:
>
> put "/Users/username/Documents/feed/"
> into pathh
> set the defaultfolder to pathh
> get the detailed files
>
> put item 1 of line 1 of it into FN
> put url ("file:" & pathh & FN)
> into dataBlock -- < does not work
>
> The file name on the hard drive is "ALL BOOKS
> AND ARTICLES VOL 1.xml"
> The variable FN is
> "ALL+BOOKS+AND+ARTICLES+VOL+1.xml"
> Replacing the +
> chars in FN does not work either.
>
> Perhaps the answer is to use a shell() command?
>
> Thanks for any advice.
>
> Jim Ault
> Las Vegas
>
Hi Jim,
All the filenames that you get from the 'detailed files' are URLEncoded, so this ought to do the trick:
##
put URLDecoded(item 1 of line 1 of it) into FN
put url ("file:" & pathh & FN) into dataBlock
##
HTH,
Jan Schenkel
=====
Quartam Reports & PDF Library for Revolution
<http://www.quartam.com>
=====
"As we grow older, we grow both wiser and more foolish at the same time." (La Rochefoucauld)
More information about the use-livecode
mailing list