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

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>
1 Like