FIle and Folder automation in Studio X - Academy inquiry

Hello,
I am running through the RPA developer course and struggling with the file and folder course. My issue begins with step 2 (Extract/Unzip File) and prevents me from correctly configuring step 3 (Write Line). I created the “ExtractedFolder” variable on step 2 but when I reach the “Write Line” step I am unable to use the “Full Path” of the variable, only the full name or extension. My data types for the variable is “system.IO.DirectoryInfo.” Unsure why I am seeing different options than the video for this course. Any insight would be appreciated!!

image

Hi
Do you want the full path the extracted file(s) ?

The Extracted contents folder gives the information about the folder

If you want the information related to extracted files, you can created a variable for Extracted Files property in Extract Unzip Files.

Then you can access the full path of the files using the file index

ExtractedFiles(0).LocalPath, for example

1 Like

ExtractedFolder is a DirectoryInfo object. You can’t just output that directly in a Write Line. You have to reference its properties. For example, ExtractedFolder.FullName will give you the folder’s full path.

There are other properties of the Unzip activity in the Properties panel. For example, the Extracted Files property gives you an array (of ILocalResource) of the files extracted.

1 Like

Also, note that having “Extract to dedicated folder” checked will create a new subfolder in the Destination Folder (which you haven’t specified) with the same name as the zip file.

I suggest hovering over each of the activity’s property names in the Properties panel to see what they do. Also, there are always documentation pages on UiPath’s web page that you can easily find with a Google search, for example “UiPath Extract/Unzip files”:

1 Like