# How to connect to Perforce from a command line or maybe a setting?

**URL:** <https://forums.unrealengine.com/t/how-to-connect-to-perforce-from-a-command-line-or-maybe-a-setting/412154>\
**Category:** Platform & Builds\
**Tags:** connection, settings, command-line, unreal-engine, Perforce, UE4, question\
**Created:** [December 13, 2017, 12:25pm UTC](https://forums.unrealengine.com/t/how-to-connect-to-perforce-from-a-command-line-or-maybe-a-setting/412154 "2017-12-13T12:25:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sgorazd](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@sgorazd](https://forums.unrealengine.com/u/sgorazd)\
**Post date:** [December 13, 2017, 12:25pm UTC](https://forums.unrealengine.com/t/how-to-connect-to-perforce-from-a-command-line-or-maybe-a-setting/412154/1 "2017-12-13T12:25:49Z")

</div>

Hi!

For example, there is a feature in _ResavePackages_ ([link](https://docs.unrealengine.com/latest/INT/Engine/Basics/Redirectors/index.html)) that would check out all modified assets.  
Obviously, the connection with perforce is needed for that kind of things.  
I know it can be done through editor itself, but I wish to do it on a build machine without ever need to run a full version of the editor and using only UE4Editor-Cmd.exe.

---

<div class="post-metadata">

**Author:** ![sgorazd](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@sgorazd](https://forums.unrealengine.com/u/sgorazd)\
**Post date:** [March 5, 2018, 9:41am UTC](https://forums.unrealengine.com/t/how-to-connect-to-perforce-from-a-command-line-or-maybe-a-setting/412154/2 "2018-03-05T09:41:25Z")

</div>

This can be done by adding a file \Saved\Config\Windows\SourceControlSettings.ini with content like this:

```
[SourceControl.SourceControlSettings]
Provider=Perforce
    
[PerforceSourceControl.PerforceSourceControlSettings]
Port=<server_address:port>
UserName=<usename>
Workspace=<workspace>
```
