🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #2496

Re: Problem with File.copy() -- should this work?

#2496
From: Peter Kahrel
Date: Sat, 13 Dec 2008 12:56
21 lines
1462 bytes
You can set the current folder like this:

Folder.current = "/d/test1/test2"

Then change to that current folder's parent using

Folder.current = ".."

But you can't use .. in file masks. This won't work:

var myFiles = Folder.cuttent.getFiles ("../*.jsx")

The only way of using .. (as far as I can see) is with literal filenames:

myFile = '../nonsense.txt'

which points to nonsense.txt in current folder's parent folder. But this is unclear as you dont't have a reference to the current folder in your statement. I agree that using relative file paths is vague and it looks as if they're best avoided.

Why copy() returns true when in fact it hasn't worked looks like a bug. I've tried it a couple of times and on Windows it gives the same results as with you: copy() says true when nothing's happened.

Peter
Technical Details
Message-ID: <59b741e0.3@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news2!newshub.sdsu.edu!webcrossing
References: <59b741e0.-1@webcrossing.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,42a64b28108c0aee
X-Google-Attributes: gidf939a,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Peter Kahrel" <kahrel@kahrel.plus.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news2!newshub.sdsu.edu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: Re: Problem with File.copy() -- should this work?
Message-ID: <59b741e0.3@webcrossing.la2eafNXanI>
Date: Sat, 13 Dec 2008 04:56:21 -0800
References: <59b741e0.-1@webcrossing.la2eafNXanI>
Lines: 27
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit