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... 
%pdfs/short/@.pdf

HTH!!
~~Ammon ;~>

On Thu, 3 Mar 2005 12:07:47 -0800, Kai Peters <[EMAIL PROTECTED]> 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)
> c/city/pdfs/short/1.pdf
> ** Access Error: Cannot open /c/city/c/city/pdfs/short/1.pdf
> ** Near: write/binary new pdf
> 
> REBOL[]
> 
> 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,
> Kai
> 
> --
> To unsubscribe from the list, just send an email to rebol-request
> at rebol.com with unsubscribe as the subject.
> 
> 


-- 
Enjoy!!
~~~ Ammon ~~~ 
~ Sui  Generis ~
~~~~  ;~>  ~~~~
-- 
To unsubscribe from the list, just send an email to rebol-request
at rebol.com with unsubscribe as the subject.

Reply via email to