Could Not find part of a Path

Utilizing Unzip activity and I am receiving the error: Could not find a part of the path 'C:\Users\acolo\Documents\UiPath\Download_Comp Reports_Varicent_ThisPC\Desktop\Sales Compensation v2.zip. This location does not exist. The file location that I have spelled out in hte variable is: This PC\Desktop\Sales Compensation v2.zip

Please update your variable to the fully qualified path as follows.
This PC is not a path.

Updated Variable Value: C:\Users\acolo\Desktop\Sales Compensation v2.zip

Regards,
Karthik Byggari

1 Like

Thank you, I made the change and now receiving the following error: Could not find file ‘C:\Users\acolo\Desktop\Sales Compensation Statement v2.zip’

Hi @annemcolo,

  • Use Path.Combine when “adding” path parts.
  • If dealing with special folders (Desktop, MyDocuments, …) use Environment.ExpandEnvironmentVariables
  • You might need to surround your path with ‘"’ as it contains spaces

for example (I don’t have my Studio so I didn’t error checked)

filename = "Sales Compensation Statement v2.zip"
desktop = Environment.ExpandEnvironmentVariables("%USERPROFILE\Desktop")
destination = Path.Combine(desktop, filename)
destination = """" & destination & """"

in_Config("destination") = "%USERPROFILE\Desktop\Sales Compensation Statement v2.zip"
destination = in_Config("destination").ToString
destination = Environment.ExpandEnvironmentVariables(destination)

1 Like