using "Directory_ListDirFiles" 

using "Directory_ListDirFiles" 

  
I have a folder X with many subfolders and files... there are so many files that the call to "Directory_ListDirFiles" with the 'showSubFolders' set to 'true' returns everything.  
Whe I call "Directory_ListDirFiles" with 'ShowSubFolders' set to 'false' I get nothing returned because there are no files in folder X??  What I need is for the call to "Directory_ListDirFiles" to return the folders in the list... so..
if there are no files in X but 20 folders the list would include the 20 subfolders and/or the 20 subfolders and the files in the X folder... ???

If I'm doing something incorrect or if there is a version that does this... please Advise...
Did you give access to the folder to the "user" that is running the IIS Worker Process (w3wp.exe) on the server?
Getting the right one can be tricky...
Hi.

If it only works with subFolders=True, I think you are in the folder above X.
yes I know ... it only works with subFolders= True... but that returns all subfolders....
It seems the call to "Directory_ListDirFiles" with subfolders = False .....
should return any files in the directory passed and also the folders in that directory...

that way you could continue to drill down ... on the listed folders.... (in the code of course)... but the way it works is I don't get a list of folders in the current folder... unless I set subfolders=true and then I get everything... ie.. all nested subfolders... which in my case can be 10's of thousands of files as you go down the chain???
here's an example.....
  folder-x
      folder-a
      folder-b
           folder-c
      folder-d
      textfile.txt

if I call "Directory_ListDirFiles" on folder-x with subfolders=False I would expect it to return me.....
    folder-a
    folder-b
    textfile.txt

what it returns is just textfile.txt???


I'm afraid you don't have it that simple. What you have is Directory_Exists and File_Exists to validate the format of any of the returning names.
"Directory_ListDirFiles" will return files only, not directories. It even says so right in the description ("Returns a list of files in a given directory and if desired, in its sub-directories"). In an older version of the FileSystem extension, there was a "Directory_ListSubDirs" that does what you want, but for some reason it was removed in later versions. If you are familiar with extensions and Integration Studio, you can add it yourself (or create a new extension). I've added the source. The only thing you need to add to the extension (besides the code) is a structure called Directory, with one Text field, DirName.
thanks... thats what I needed....
Killan.....
   question.. how do you define the recordlist ie... 'RLDirectoryRecordList'  and the 'RCDirectoryRecord' types



I've created the Action in the C# code... but it seems when I use "public void xxxxx" the import function in Integration studio doesn't fine the Action???

How do I get this function to list in Integration Studio???

You must first define the action in Integration Studio, before pasting the C# code, with the same interface as the C# function. Then use "update source" so it will create it in the .cs file, then modify that function based on the code I provided. The recordlist should be defined as I said. If you like I can post some more instructions, but that'll have to wait until after the weekend.