Question Move file from Path to PS3

Discussion in 'Questions' started by Koreax, Jul 21, 2018.

  1. Koreax

    Koreax Well-Known Member

    34
    17
    218
    Credits:
    203
    Dear CabCon Community,
    I'm currently building an advanced Console Manager aka CCAPI 2.90 which i want to improve with many new features.

    I'm trying to Move a file from any folder directly to my PS3 without using FTP.

    I want to use it in my button that user can put a custom path on their console to move a specific file to this direction.

    My code so far that i tried but failed:

    string sprx = Path.Combine(Directory.GetCurrentDirectory(), "Settings.sprx");
    File.Create(sprx);
    string url = "Please login or register to view links or downloads!";
    File.Copy(sprx, url);
     
  2. ANDYMODZYT

    ANDYMODZYT Known Member

    67
    22
    128
    Credits:
    681
    I made something like this not too long ago heres how i do it
    Code:
            public void UploadFileToFtp(string url, string filePath, string username, string password)
            {
                var fileName = Path.GetFileName(filePath);
                var request = (FtpWebRequest)WebRequest.Create(url + fileName);
    
                request.Method = WebRequestMethods.Ftp.UploadFile;
                request.Credentials = new NetworkCredential(username, password);
                request.UsePassive = true;
                request.UseBinary = true;
                request.KeepAlive = false;
    
                using (var fileStream = File.OpenRead(filePath))
                {
                    using (var requestStream = request.GetRequestStream())
                    {
                        fileStream.CopyTo(requestStream);
                        requestStream.Close();
                    }
                }
    
                var response = (FtpWebResponse)request.GetResponse();
               MessageBox.Show("File uploaded. Check the tmp folder.");
                response.Close();
            }
    
    UploadFileToFtp("ftp://" + "IP Here" + "/dev_hdd0/tmp/", "Path Here", "", "");
     
  3. Harry

    Harry Software Engineer Premium Member

    1,185
    969
    398
    Credits:
    5,777
    CCAPI 2.90?????
    Jesus Christ...
     

Share This Page