Hi all, I'm running into a issue with pulling the ...
# suitescript
a
Hi all, I'm running into a issue with pulling the content list of a specific folder via SFTP. SuiteScript seems to be ignoring the path that I put in and just list the contents of the root folder. Has anyone ever run into this before?
Copy code
var fileNames = connection.list({
                path: '/Purchase_Orders'
            });
The connection is to the root folder.
Thank you!
e
path
is relative
so perhaps try
Purchase_Orders
instead of
/Purchase_Orders
i.e. no
/
a
Nope, no luck. It still just pulls straight from the root...
I had originally created the connection straight to the sub-folder but kept getting an unexpected_error with that...
c
Have you tried using a dot to refer to your current directory e.g.
./Purchase_Orders
?
a
It was an odd workaround - I created the connection directly to the subfolder and pulled the list using - path: '' And then reset the connection to the root folder and downloaded the file using the directory - to the subfolder...
👍 1
e
so there is potentially a bug with the
list()
method which is not respecting the
path
option
a
I suppose so. I'm pretty new to NetSuite, is there somewhere that I should report this?