> For the complete documentation index, see [llms.txt](https://docs.parallels.com/landing/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.parallels.com/landing/ras-windows-cli-guide/commands/uploadfile.md).

# uploadfile

![Parallels](https://www.parallels.com/static/pl/fileadmin/res/img/navigation/pl-logo-dk.png)

## AppserverClient Command Line Interface

### uploadfile

upload a file to the remote session.

**Category: Sessions**

```
AppServerClientCLI uploadfile -id session:545567 [-localfile c:\test\send.txt] [-remotefile c:\test\receive.txt] [-autoclosewnd] [-waitforcomplete [20]]  
```

### Arguments

* **`id (mandatory)`** Specify a session ID to use for the file transfer.
* **`localfile (optional)`** Specify the file to upload. If omitted, the user will be prompted to choose it.
* **`remotefile (optional)`** Specify the filepath where to store the uploaded file. If omitted, the user will be prompted to choose it.
* **`autoclosewnd (optional)`** When specified, the file transfer window will close when ready.
* **`waitforcomplete (optional)`** When specified with a time value in seconds, this command will return when the transfer is ready, has failed, or has timed out.

### Return codes:

ok - Command was successful\
NotAvailable - Communication with the client backend failed, ensure that the client is running\
InvalidArgs - Some arguments are missing or invalid\
InvalidId - Invalid connection, object or session ID\
Exception - System problem

### Examples:

AppServerClientCLI uploadfile -id session:545567\
AppServerClientCLI uploadfile -id session:545567 -localfile c:\test\send.txt\
AppServerClientCLI uploadfile -id session:545567 -localfile c:\test\send.txt -remotefile c:\test\receive.txt\
AppServerClientCLI uploadfile -id session:545567 -localfile c:\test\send.txt -remotefile c:\test\receive.txt -autoclosewnd\
AppServerClientCLI uploadfile -id session:545567 -localfile c:\test\send.txt -remotefile c:\test\receive.txt -autoclosewnd -waitforcomplete\
AppServerClientCLI uploadfile -id session:545567 -localfile c:\test\send.txt -remotefile c:\test\receive.txt -autoclosewnd -waitforcomplete 20

### Notes:

Please note that the API returns when the file transfer is initiated and not when it is complete.

### See also:

[sendkeys](/landing/ras-windows-cli-guide/commands/sendkeys.md)\
[sendmouseevents](/landing/ras-windows-cli-guide/commands/sendmouseevents.md)\
[sendkeyboardevents](/landing/ras-windows-cli-guide/commands/sendkeyboardevents.md)\
[getsessionsinfo](/landing/ras-windows-cli-guide/commands/getsessionsinfo.md)\
[disconnectsession](/landing/ras-windows-cli-guide/commands/disconnectsession.md)\
[downloadfile](/landing/ras-windows-cli-guide/commands/downloadfile.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.parallels.com/landing/ras-windows-cli-guide/commands/uploadfile.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
