Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Another newbie stumper

 [1/2] from: kpeters::vu-ware::com at: 3-Mar-2005 12:07


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

 [2/2] 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... %pdfs/short/@.pdf HTH!! ~~Ammon ;~> On Thu, 3 Mar 2005 12:07:47 -0800, Kai Peters <[kpeters--vu-ware--com]> wrote:
> Hi all ~ > another one has me baffled:
<<quoted lines omitted: 21>>
> To unsubscribe from the list, just send an email to rebol-request > at rebol.com with unsubscribe as the subject.
-- Enjoy!! ~~~ Ammon ~~~ ~ Sui Generis ~ ~~~~ ;~> ~~~~

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted