SAP folder , subfolder , file( tree structure) to be downloaded in Local System along with each file path in excel

I am working on SAP application and need to automate the SAP folder , file tree structure through UiPath.

Task 1) Bot should dynamically go folder and subfolders (level dynamic-not defined) and download the files (if found).

Task 2) Bot should get the complete Path (location in SAP)of each file downloaded in an excel sheet like S.No , File Name , File Path in SAP


Welcome to uipath forum

  1. To navigate across sap pages we can use these SAP WIN GUI Activities
    About SAP WinGUI Automation

  2. And to get the filepath and Filename of the file downloaded we can use Path.GetFilename method

Like this

  • Once all the files are downloaded to a folder use a Build datatable activity and create number of columns you want like S.No., Filename, FilePath and get the output as datatable named dt

  • then use a assign activity like this

arr_filepath = Directory.GetFiles(“yourfolderpath “)

Where arr_filepath is a variable of type array of string

  • now use a FOR EACH activity and pass the above array variable as input and change the type argument as string in its property

  • inside the loop use a Add Datarow activity and in its property panel mention as

ArrayRow - {Array.IndexOf(arr_filepath, item).ToString, Path.GetFileName(item.ToString), Item.ToString}

Datatable as dt

Cheers @Deep_Deep

  1. SAP WIN activities I tried but with that I only can expand the tree .I need to Capture Folders subfolders and sub-subfolders which are dynamic .And if Possible —to download the complete SAP folder structure along with files in subfolders in my local system

  2. Path.GetFilename method …will that give the file path as per my local system for the file . As my requirement is to get path for each file as stored in Folder -Subfolder structure in SAP application

HI @Deep_Deep

To be able to understand your automation challenge better, please share following information:

  • SAP WinGUI version
  • SAP WinGUI transaction
  • UiPath Studio version
  • UiPath UiAutomation Activity version

In addition share the following screenshots:

  • SAP WinGUI screenshot - Full screen (you can blurry the business information)
  • SAP WinGUI screenshot - exact the flow, what you are doing.

Best regards, Lev

1 Like