Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 4 Monaten, 3 Wochen
Letzter Beitrag:
vor 2 Monaten, 1 Woche
Beteiligte Autoren:
InfosPilot, Fabrice Harari

[WM] Copy file from Mobile to PC

Startbeitrag von InfosPilot am 24.02.2018 16:54

How to copy a file from Andoid application to PC in WM, if the mobile phone and PC are on the same WiFi network, if anyone knows which command to use, Thanks

FileToCopy is string = "Datoteka.txt"
CopiedFile is string = "\\\Razmjena\Datoteka.txt"
ResCopy is boolean

// Copy the file
ResCopy = fCopyFile(FileToCopy, CopiedFile)
// Display an error message if the copy failed
IF ResCopy = False THEN

this code does not work if someone has a solution?



what is the error ?

von Fabrice Harari - am 26.02.2018 18:27

the error is in the picture, thank you

von InfosPilot - am 27.02.2018 09:59
Nobody did anything like this?

von InfosPilot - am 09.03.2018 08:45

your code doesn't test if the file exist or not, doesn't display a message if the file creation didn't work, so it's possible that your error is that you are trying to write in a place where you are not allowed to write on the phone in the first place, and therefore, as the final error message suggest, there is no such file.

So you need to
1. specify WHERE you are writing in your text file
2. add an else clause with a message to your fcreate test on -1

Finally, as to doing the same thing, I am, but I'm using a replication system that will work even when the phone is NOT in the same network, so I didn' try that specific route

Best regards

von Fabrice Harari - am 09.03.2018 10:33
Thank you for your reply
I'll try to play some more with this code

Best regards

von InfosPilot - am 10.03.2018 13:33

If I put the CopiedFile path is string = "\ \ \ Exchange \ File.txt" then I made a mistake

If I put the CopiedFile path is string = " \ Razmjena \" in this case the message on the executed operation is OK but nothing happens, the file is not transferred to the PC

The txt file is created and exists on a mobile device

I do not know why, did anyone have a similar problem?

von InfosPilot - am 10.05.2018 07:02

I solved this by using the FTP option that works perfectly

von InfosPilot - am 11.05.2018 07:04
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.