Important Community update: The process for changing your account details was updated on June 25th. Learn how this impacts your Community experience and the actions we suggest you take to secure your account here.

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Use directory tool to pull files based on creation date?

DaveSchloat
7 - Meteor

Hello, 

I would like to have the directory tool pull just the file data for the files created today (dynamically).  I know I can read the folder and pass through a filter, but the folder has a truly obscene number of files in it, so pulling all that data takes a very long time.  I could have the WF run in a fraction of the time if I could specify the creation date.

And no, I can't use file name because the file name does not contain the date.

 

Alternatively, I COULD look for files based on a dynamic list of a portion of the file name.... if there's a way to do that.  

 

But creation date would be best.

12 REPLIES 12
alexnajm
17 - Castor
17 - Castor

How many files are there? It should be only pulling metadata from those files, so I'd be surprised if it was taking more than several seconds... because you described exactly what I'd do - use the creation date in a filter after the directory tool. You also already noted the file specification wouldn't work.

 

Have you turned on Performance Profiling? That might help determine your workflow's bottlenecks - it's right under the Runtime tab!

TimN
13 - Pulsar

I see this:

https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/How-to-get-results-of-DIR-comm...

 

I don't think it's exactly what you need but you might be able to use this approach from @jdunkerley79 

DaveSchloat
7 - Meteor

There's a few hundred thousand files.  I'll see if I can find the performance profile, but I really think it's just because there are so many files.

alexnajm
17 - Castor
17 - Castor

Sure, go ahead and try the Performance Profile! I just tried a Directory tool on one of our large folders - 97,000 records in 4.6 seconds. This is why I am surprised it's taking so long on your end - I wouldn't imagine it taking longer than 20-30 seconds.

 

So then my guess is that it's likely a memory or network issue - is that possible? I agree that my second thought was that it'd have to be some sort of run command, which it looks like @TimN provided a possible solution. I don't have the Run Command knowledge to help form something proper, but hopefully it helps.

DaveSchloat
7 - Meteor

Thanks Alex - I'm trying that run command.  It's definitely possible that it's a network issue.  The folder is a network folder and "lives" on the other side of the country from me.  :)  But the directory command pulled down the file names in 90 seconds.  That's very not bad!

 

alexnajm
17 - Castor
17 - Castor

Great news!

TimN
13 - Pulsar

Hi,

If the Run command solution works, please mark as the solution.

 

Thank You.

DaveSchloat
7 - Meteor

If I can figure out how to use the file name to go back to the folder and get the file creation date, then I certainly will.  :)

DaveSchloat
7 - Meteor

Interesting.  It seems the Run command solution only can function with /B (file name only) in the output.  I tried to be slick and change it to /T:C to get the creation timestamp, too, and the command tells me there are too many fields on row 9.  Trying to figure that part out....but I'm not a DOS guy.

 

Labels