Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Small script required  (Read 28366 times)

0 Members and 1 Guest are viewing this topic.

mits81

    Topic Starter


    Newbie

    • Experience: Beginner
    • OS: Unknown
    Small script required
    « on: February 01, 2020, 08:43:44 AM »
    Need to identify when a USB device has been plugged in, look for a file on the device, if file found then copy contents of device to a sub folder called current date, inside the folder named the same as the file looked for.

    e.g.

    Name of File: File1
    if found, should copy device contents to a folder D:\File1\01022020

    Any suggestions on where to start.

    DaveLembke



      Sage
    • Thanked: 662
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: Small script required
    « Reply #1 on: February 01, 2020, 11:59:17 AM »
    The script would be one that could be used for malicious intent. A computer with this running as a service seeing any USB device and copying all contents sounds like data theft.

    What is the intent of this to where it can be used in a non-malicious way?

    Looking for a file found can all so easily be replaced with a wildcard instruction to grab all data and steal data!  :-\

    Any computer that is used by others with this would basically steal information from them upon inserting a USB stick.  ::)

    A better approach would be that your working in IT and need to track users and place a script on the thumb drive that reports home with a file that needs to be saved with a date/time folder from a user instead of the other way around. This way only those USB sticks run the script when the users want it to, instead of trying to potentially hide that data is being copied from USB stick. The users should really have control of what data they are sharing and a script this way would do that and a DOS SHELL window would pop up for a moment and then disappear after the copy process complete.