Rename file before synchronizing it

YR
Yoan R
COPPERNIC

Hello,

Device Platform : Android

MC version : 14.3.3.1111

Enrollment method : AE DO

Is there a way to rename a file before its synchronization and indicate the DeviceID in the file name ?

The following setting does not work:

For testing purpose I tried with a pre execute script :

copy %sdcard%\logs\20200922.log %sdcard%\logs\%DEVICEID%_20200922.log
del %sdcard%\logs\20200922.log

This solution works, BUT requires to know the name of the log file to be retrieved. So it's not very feasible... And what if I had to retrieve and rename multiple files ?

Do you have any idea / method ?

Many thanks for your help.

Best regards,

Yoan.

4 years ago
Android
ANSWERS
RC
Raymond Chan
4 years ago

You can consider enabling either of the the following two options in the "FILES" tab of your file-sync rule: 

   Create subfolders for uploading files using the Phone ID (IMEI/MEID/ESN)
 
Then rename and/or move the files on the server file-system.   There are many more powerful scripts (Powershell, Bourne, Python, ... etc.) you can run on the MS-Windows server to smartly rename/move the files after they have been uploaded from the devices.
 
 
 
 
YR
Yoan R
4 years ago

Hello Raymond,

Thank you for your quick answer.

I'm going to study this lead. Thanks for the advice.

Best regards,

Yoan