Join the Alteryx Community’s Maveryx Summer Cup event! Compete, network with others, and earn your gold through a series of challenges from July 24th to August 11th. Learn more about the event here.

Alteryx Designer Desktop Discussions

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

LastAccess Time and LastWrite Time of a file

N783970
6 - Meteoroid

Hi Team,

 

I am looking to make an Alteryx macro that can read an excel file that contains the path and file names. Now from this list, I need to know the LastAccess Time, LastWrite time of these files.

 

Please help.

 

6 REPLIES 6
DataNath
17 - Castor

Hey @N783970, can you expand on the request a bit more? You can get all of this from the Directory tool's output:

 

DataNath_0-1681729448230.png

 

Do you want to add this info to the contents of the file once you've read it in? Not sure I fully understand.

N783970
6 - Meteoroid

Thank you for the reply @DataNath .Now the directory tool can only give the status of the files if the path is the same. My ask is, I have 5 different paths and 5 different files. I need the status of these 5 files from different paths. Now I can use 5 different directory tools. But what if the number of paths and files increase? Hence, I need to make a macro for the same where I can read from an excel file that contains the paths and the files names and then make a consise list of the status of these files.

binuacs
20 - Arcturus

@N783970 If all these paths are having a common folder location then read that folder location using the directory tool (select the sub directory option) then filter out the path of the file you are looking for

N783970
6 - Meteoroid

Thank you for you reply @binuacs . Their paths have nothing in common. For example;

File 1; C:/Desktop/Folder1/File 1

File 2: D:/SubFolder1/Subfolder2/File 2.

binuacs
20 - Arcturus

@N783970 Okay, I believe you have the list of directories, then you create a batch macro and feed the directory path and get the result. Attaching a sample reference

 

 

binuacs_0-1681733035769.png

 

 

 

N783970
6 - Meteoroid

Thank You for your help. Modified the macro to help accommodate my ask.

Labels