[REBOL] Re: Another newbie stumper
From: ammon::johnson::gmail::com at: 3-Mar-2005 13:12
Your missing the leading slash here:
new: replace copy %c/city/pdfs/short/@.pdf "@" i
Make that %/c/city/pdfs/short/@.pdf and you should be good to go.
leading slash indicates complete path, otherwise it uses the current
directory and appends the file path to it. An alternative fix is...
On Thu, 3 Mar 2005 12:07:47 -0800, Kai Peters <[kpeters--vu-ware--com]> wrote:
> Hi all ~
> another one has me baffled:
> the print statement in script below shows the proper expected filenames
> the write immediately below fails showing a different dest directory:
> >> do %/c/city/rename.r
> Script: "Untitled" (none)
> ** Access Error: Cannot open /c/city/c/city/pdfs/short/1.pdf
> ** Near: write/binary new pdf
> files: read %/c/city/pdfs/
> i: 1
> foreach file files[
> pdf: read/binary append copy %/c/city/pdfs/ file
> new: replace copy %c/city/pdfs/short/@.pdf "@" i
> i: i + 1
> print new
> write/binary new pdf
> What do I need to learn here?
> As always, thanks for any pointers,
> To unsubscribe from the list, just send an email to rebol-request
> at rebol.com with unsubscribe as the subject.
~~~ Ammon ~~~
~ Sui Generis ~
~~~~ ;~> ~~~~