Can i check if a file exist on cloud before upload ?


How can i check if a file exist on cloud ?

Thank you!


You can use the Search call to find out if a specific filename already exists on the cloud storage drive.

I cannot manage, can you send me an example please?

TMSFNCCloudDropBox1.Search('foldername', 'filename.ext');

You can use an empty string as the first parameter to search in the root folder.

Thank you for answer,

I know this, but i don't understand how to get the result "true/false" if file exist or not !?


If the ASearchResults.Count of the OnSearch event is higher than 0, the file exists.

procedure TForm1.TMSFNCCloudDropBox1Search(Sender: TObject;
  const ASearchResults: TTMSFNCCloudDropBoxItems;
  const ARequestResult: TTMSFNCCloudBaseRequestResult);
  FileExists: boolean;
  FileExists := ASearchResults.Count > 0;

  TTMSFNCUtils.Log(BoolToStr(FileExists, True));

Thank you!