Thank you, but... tested with Notepad++, and don't work...
Script:
#!/bin/sh
cp $1/Test1.txt /volume1/Tom/Test1.txt
exit 100
Log:
2016-09-23 17:43:52: device 'sdq1' - event received from udev DEVNAME=/dev/sdq1 ACTION=add USEC_INITIALIZED=277853968 SEQNUM=771 ID_PART_ENTRY_SIZE=62650368 MAJOR=65 ID_FS_UUID_ENC=72C0E61AC0E5E3F7 ID_FS_LABEL_ENC=PNY SYNO_DEV_DISKPORTTYPE=USB ID_FS_UUID=72C0E61AC0E5E3F7 DEVPATH=/devices/platform/orion-ehci.0/usb1/1-1/1-1.1/1-1.1:1.0/host7/target7:0:0/7:0:0:0/block/sdq/sdq1 ID_PART_ENTRY_SCHEME=dos ID_FS_LABEL=PNY ID_PART_ENTRY_TYPE=0x7 SUBSYSTEM=block ID_PART_ENTRY_FLAGS=0x80 PHYSDEVPATH=/devices/platform/orion-ehci.0/usb1/1-1/1-1.1/1-1.1:1.0/host7/target7:0:0/7:0:0:0 MINOR=1 ID_FS_TYPE=ntfs SYNO_PLATFORM=88f6281 PHYSDEVDRIVER=sd ID_PART_ENTRY_OFFSET=2048 ID_PART_ENTRY_DISK=65:0 PWD=/ PHYSDEVBUS=scsi ID_PART_ENTRY_NUMBER=1 DEVTYPE=partition ID_FS_USAGE=filesystem SYNO_KERNEL_VERSION=2.6
2016-09-23 17:43:52: device 'sdq1' - inserted, trying to find mount point
2016-09-23 17:44:03: device 'sdq1' - mount point '/volumeUSB1/usbshare' found
2016-09-23 17:44:03: device 'sdq1' - script '/volumeUSB1/usbshare/autorun' found, executing
2016-09-23 17:44:03: device 'sdq1' - script '/volumeUSB1/usbshare/autorun' finished (17G left on device), no further actions
Script:
#!/bin/sh
cp $1/Test1.txt /volume1/Tom/Test1.txt
exit 100
Log:
2016-09-23 17:43:52: device 'sdq1' - event received from udev DEVNAME=/dev/sdq1 ACTION=add USEC_INITIALIZED=277853968 SEQNUM=771 ID_PART_ENTRY_SIZE=62650368 MAJOR=65 ID_FS_UUID_ENC=72C0E61AC0E5E3F7 ID_FS_LABEL_ENC=PNY SYNO_DEV_DISKPORTTYPE=USB ID_FS_UUID=72C0E61AC0E5E3F7 DEVPATH=/devices/platform/orion-ehci.0/usb1/1-1/1-1.1/1-1.1:1.0/host7/target7:0:0/7:0:0:0/block/sdq/sdq1 ID_PART_ENTRY_SCHEME=dos ID_FS_LABEL=PNY ID_PART_ENTRY_TYPE=0x7 SUBSYSTEM=block ID_PART_ENTRY_FLAGS=0x80 PHYSDEVPATH=/devices/platform/orion-ehci.0/usb1/1-1/1-1.1/1-1.1:1.0/host7/target7:0:0/7:0:0:0 MINOR=1 ID_FS_TYPE=ntfs SYNO_PLATFORM=88f6281 PHYSDEVDRIVER=sd ID_PART_ENTRY_OFFSET=2048 ID_PART_ENTRY_DISK=65:0 PWD=/ PHYSDEVBUS=scsi ID_PART_ENTRY_NUMBER=1 DEVTYPE=partition ID_FS_USAGE=filesystem SYNO_KERNEL_VERSION=2.6
2016-09-23 17:43:52: device 'sdq1' - inserted, trying to find mount point
2016-09-23 17:44:03: device 'sdq1' - mount point '/volumeUSB1/usbshare' found
2016-09-23 17:44:03: device 'sdq1' - script '/volumeUSB1/usbshare/autorun' found, executing
2016-09-23 17:44:03: device 'sdq1' - script '/volumeUSB1/usbshare/autorun' finished (17G left on device), no further actions