# How to Upload a file from file from explorer

**URL:** <https://forum.katalon.com/t/how-to-upload-a-file-from-file-from-explorer/120243>\
**Category:** AI & Agentic Testing\
**Tags:** web-testing, katalon-studio\
**Created:** [February 16, 2024, 9:15pm UTC](https://forum.katalon.com/t/how-to-upload-a-file-from-file-from-explorer/120243 "2024-02-16T21:15:49Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![grylion54](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/grylion54/32/16265_2.png) [@grylion54](https://forum.katalon.com/u/grylion54)\
**Post date:** [February 16, 2024, 9:20pm UTC](https://forum.katalon.com/t/how-to-upload-a-file-from-file-from-explorer/120243/2 "2024-02-16T21:20:18Z")

</div>

The below link might assist you.

> [@How to use the 'Robot Framework' to load files using a custom keyword](http://forum.katalon.com/t/how-to-use-the-robot-framework-to-load-files-using-a-custom-keyword/24108):
>
> Please Note: Best practices is to NOT to use WebUI.delay() OR Thread.sleep() but sometimes there is no alternative. First create a new ‘uploadFiles’ custom keyword as follows: -Start ‘Katalon Studio’ -Open any test project -Click ‘File’ \> ‘New’ \> ‘Keyword’ -Input ‘Package’= tools -Input 'Class Name" = uploadFiles -Click ‘OK’ -Result: A new ‘uploadFiles.groovy’ custom keyword is created Copy and paste the following code to the new custom keyword: //Use "CTRL+SHIFT+O" to add any require…

Edit: Does your pathway have double slashes in it? It needs them. (A single slash is an escape character, like for the “new line”, `\n`, or “tab”, `\t`, so the second slash says that the first slash is just a slash.)

```auto
gImportFileName = 'G:\\Katalon Test Cases\\KatalonCASE\\Data Files\\Details.txt';

```

---

_[View the full topic](https://forum.katalon.com/t/how-to-upload-a-file-from-file-from-explorer/120243)._
