Windows 10: Script to find a specific USB drive and copy a file?

Discus and support Script to find a specific USB drive and copy a file? in Windows 10 Support to solve the problem; I need help writing a script to find a specific USB flash drive and copy a file. I know the path to the file except for the drive letter. The USB flash... Discussion in 'Windows 10 Support' started by pokeefe0001, Aug 5, 2021.

  1. Script to find a specific USB drive and copy a file?


    I need help writing a script to find a specific USB flash drive and copy a file. I know the path to the file except for the drive letter. The USB flash drive could be any of 3 - call them USB_Drive1, USB_Drive2, and USB_Drive3. The actual copy is no problem, but I have no idea how to find the drive letter. The script has to run on both Windows 10 and very old (by definition) Windows 7. I assume the the Win7 systems have PowerShell 3.0 but I don't know for sure. Are there any sample scripts I can look at to help me along? I'm completely PS-illiterate so I'm likely to as lots more questions if the examples are in PS. I'm running Win 10 20H2, build 19042.1110, but that's not very meaningful information since the script has to run on Win7.

    :)
     
    pokeefe0001, Aug 5, 2021
    #1

  2. Copying music files to a thumb drive

    Hi Dennypic747,

    Thank you for posting your question in the Microsoft Community Forums.

    I appreciate your efforts to work on this issue.

    Please answer these questions to get clarity on this issue:

    1. What is the exact name of the app that you are using?
    2. Is that a Microsoft Store app or a Desktop app?
    3. How did you download the music files and where have you saved those files?

    Please follow these steps to copy the music files from the computer to the USB flash drive:

    Step 1: Insert the USB drive into the USB port on your computer. Try to use a port directly on your computer. Windows will usually notify you that a USB drive was inserted, and an AutoPlay window may appear. You can close
    the AutoPlay window for now.

    Step 2: Open File Explorer by pressing Windows key + E together.

    Step 3: Click This PC and Find your USB drive. Your USB drive will be displayed in the "Devices and drives" section of the window.

    Step 4: Note the drive letter for the USB drive. Knowing the drive letter will make it easier to send files to the drive later.

    Step 5: Find the music files that you want to copy to the USB drive. Your music files may be located in a variety of locations on your computer:

    Step 6: Select all of the files and folders that you want to copy. You can also press Ctrl+A to select everything in the current folder.

    You may find it easier to move all of your music files into one spot on your computer, organized into folders. You can then copy all of the folders and files at once.

    Step 7: Wait for the files to copy. Your selected files will begin copying to your USB drive.

    Step 8: Once the copy is done, click the "Safely Remove Hardware" button in your System Tray. This will unmount the drive from your system, allowing you to safely remove it without corrupting any data.

    Pull the USB drive out of the computer. Your music is now safely stored on your USB drive.

    Let us know the result of the steps performed so that we can help you further.

    Awaiting your reply.

    Regards,

    Srimadhwa B

    Microsoft Community-Moderator
     
    Srimadhwa_B, Aug 5, 2021
    #2
  3. KomouPoji Win User
    how to copy files from the CD to the Computer drive

    Hi Hankriegler,

    I would suggest you to follow the steps below:


    • Press Windows key + X.

    • Click file explorer from the list.

    • Select the CD/DVD drive and hit Enter.

    • Select the files you want to copy from the CD/DVD, then select the drive where you want to paste or save.
    I hope the information is helpful.

    Thank you.
     
    KomouPoji, Aug 5, 2021
    #3
  4. Script to find a specific USB drive and copy a file?

    Script can copy file directory in one spot but not the other

    It's having trouble copying any of the files in the sub directories of frank. All the files directly under frank are properly backed up and the originals are properly edited.

    The script runs using a foreach, looking for any file that ends with a specific extension, in the directory specified. It uses File::find to locate each file. The script first copies the file and adds "orig" to the extension name, for example the file is .origpy instead of .py. The original file is changed from read only to full write permissions. Then it is opened for reading, all is read into memory except the comments. The file is closed. The file is opened for writing. Everything from the file in memory is written to file. The file is closed, and changed back to read only.

    This works great in Linux. I tried it in XP, its fine as well. just something about the directory structure on this server that wont let it work for the sub directories in frank.
     
    Hybrid_theory, Aug 5, 2021
    #4
Thema:

Script to find a specific USB drive and copy a file?

Loading...
  1. Script to find a specific USB drive and copy a file? - Similar Threads - Script find specific

  2. Can not find script file

    in Windows 10 BSOD Crashes and Debugging
    Can not find script file: I keep getting this ca not find script fileC:\users\jonal\AppData\roaming\kSKXrcc\522.vbsI download mcafee to scan virus and it started popping out. What should i do to get rid of it? My laptop is so slow. How to make it fast?...
  3. Can not find script file

    in Windows 10 Network and Sharing
    Can not find script file: Hey there I've got a problem. Since a few weeks whenever I log in on my computer, I receive like 8-9 windows with the problem can not find script file. the thing is I couldn't find anything google since my problems doesn't have to do with vbs. At least I think so. The missing...
  4. Can not find script file

    in Windows 10 BSOD Crashes and Debugging
    Can not find script file: [ATTACH] every time open a computer will show this error message how can i fix this please help me it's so annoying Thank you (Moved from th-th to en-us)...
  5. Can not find script file

    in Windows 10 BSOD Crashes and Debugging
    Can not find script file: I get this message every time I start my computer :can not find script file c/users/perflogs/DCIM.JPG. I looked the perflogs file but the folder is empty (checked hidden files). Is there any solution for this error? How to remove this message that appears every time I start...
  6. Cannot find script file

    in Windows 10 BSOD Crashes and Debugging
    Cannot find script file: I keep on receiving a Windows script file error saying can not find script file "C:\ness\miner\windows1.vbs". https://answers.microsoft.com/en-us/windows/forum/all/cannot-find-script-file/9b6b25a9-0fa1-45c8-ada0-d3c49efe7d3e
  7. can not find script file

    in Windows 10 BSOD Crashes and Debugging
    can not find script file: [ATTACH] this message pop-up every hour on my computer https://answers.microsoft.com/en-us/windows/forum/all/can-not-find-script-file/689a612c-f146-4d1d-a45a-3a87f369fa75
  8. Can not find script file

    in Windows 10 BSOD Crashes and Debugging
    Can not find script file: Can anyone help me with this pop up saying "C:\Users\julietbarangan\AppData\Roaming\pmhcpjy\rrgvk.js"? It actually appears every time I used to turn on my laptop, I even used an anti-virus before but it just doesn't work. How I can eliminate that such thing? Thank you!...
  9. Can not find script file

    in Windows 10 BSOD Crashes and Debugging
    Can not find script file: Recently a notification started to pop up on my screen with 10-15 minutes frequency. It says that windows cant open 1.vbs file which I believe is traces of the virus. My antivirus software probably got rid of it and left this script to trying open something that doesn't exist...
  10. Copy WinSXS file to usb drive

    in Windows 10 Performance & Maintenance
    Copy WinSXS file to usb drive: I have two desktops - exactly same specs - Windows 10 10240. One runs SFC Scannow showing no corruption and DISM with no errors. The other has corruption but SFC can't fix and Dism can't find source files. My thinking is if I can use the 1st pc's WinSXS files to run DISM,...