🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #8592

[JS] reading variable CSV file

#8592
From: Roy Marshall
Date: Wed, 11 Oct 2006 21:44
12 lines
1124 bytes
Help Needed...

I have these lines of code:
myFile= File("~/Desktop/UStar/Sample.csv");
myFile = File(myFile.fsName);

to read a CSV file of the name Sample.csv in a specific folder. This all works hunky dory. I am needing to adapt this part to read whichever csv file is in this directory (regardless of its name) and to have the file name put into a variable that I will use later on in the script.
i.e the file could be called 'order number 100.csv', which will be read into 'myFile' and the name 'order number 100' used within the script.

Cheers

Roy
Technical Details
Message-ID: <3bc1f182.-1@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.germany.com!news.ecp.fr!news.stben.net!webcrossing

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,25b80f6897eeea18,start
X-Google-Attributes: gidf939a,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Roy Marshall" <rmarshall@rpm-repro.co.uk>
Newsgroups: adobe.scripting.indesign
Subject: [JS] reading variable CSV file
Message-ID: <3bc1f182.-1@webcrossing.la2eafNXanI>
Date: Wed, 11 Oct 2006 14:44:07 -0700
Lines: 16
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.germany.com!news.ecp.fr!news.stben.net!webcrossing