如何在连接到系统时从USB驱动器复制一些文件 [英] how to copy some files from the USB drive the moment it is connected to the system

查看:191
本文介绍了如何在连接到系统时从USB驱动器复制一些文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Qt 4.8中编写一个应用程序,我需要在连接到系统时从USB驱动器复制一些文件。应用程序在运行时应该能够检测到插入了笔式驱动器而没有用户干预,应该查看特定文件的USB驱动器并将其复制到本地驱动器。每次插入新的笔式驱动器时都会发生这种情况。有什么简单的方法可供我使用吗?请建议。

I am writing an application in Qt 4.8 where in I need to copy some files from the USB drive the moment it is connected to the system. The application while it is running, should be able to detect that a pen drive is inserted and without the user intervention, should look into the usb drive for specific file and copy it to the local drive. This should happen every time a new pen drive is inserted. is there any simple method which i can use? Please suggest.

推荐答案

作为解决方案1的Ubuntu替代方案,看看这些帖子

http://stackoverflow.com/questions/14144781/receiving-notification-event-signal-of -usb-device-insertion-in-c [ ^ ]



http://ubuntuforums.org/archive/index.php/t-1698531.html [ ^ ]



http://ubuntuforums.org/showthread.php?t=1099560 [ ^ ]
As a Ubuntu alternative to solution 1 have a look at these posts
http://stackoverflow.com/questions/14144781/receiving-notification-event-signal-of-usb-device-insertion-in-c[^]

http://ubuntuforums.org/archive/index.php/t-1698531.html[^]

http://ubuntuforums.org/showthread.php?t=1099560[^]


这篇关于如何在连接到系统时从USB驱动器复制一些文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆