About Script Location

What is the location for a script that detects a external drive in .kodi folder.
and which script does the scrapping for media file ? is it in a .kodi folder ? or where it is ?

Deleted.

so, if I create one then where to locate it ?

You can just leave your script in your home directory (/home/osmc) you’ll be able to run scripts from there.

This sounds similar to this thread

If you explain what you are trying to do perhaps we can offer suggestions.

i have attached hard drive with raspberry pi working as an internal drive.I am making 2 changes in kodi. First is, once a user attach any external drive to raspberry pi then raspberry pi should find all the media files in external drive and ask user permission to copy it in internal drive if user will select yes then it will copy all media files in internal drive automatically. and another change is AI recommendation of media files according to user’s behavior. there will be multiple user and system should recommend media according to past behavior to user

It doesn’t do everything you want but it’s a start.

https://forum.kodi.tv/showthread.php?tid=205060
https://forum.kodi.tv/showthread.php?tid=139284

I like the second one, it doesn’t classify your files but if it’s in a folder called moviecopy then it assumes it’s a movie, if it’s in a folder called tvcopy it assumes it’s a TV show, that may work for you.

Thanks for the help I will give it a try