troubleshooting Question

How to copy a file from a storage device NOT drive letter through VBA

Avatar of wlwestrom
wlwestrom asked on
Microsoft Access
2 Comments1 Solution493 ViewsLast Modified:
I am trying to copy a file from a storage device to a folder on my c:.  The devices comes up in Explorer like "Computer\Nexus 7\Internal storage" with no drive letter.  Also if I create a batch file to copy the file over from that location this particular file is hidden in DOS but i can see it in Explorer, R Click copy and paste fine.  

Ultimately I would like the user to be able to browse for the location and file and store the path but since it isnt a drive this isnt working.

Private Function BrowseforFile(szDialogTitle As String) As String
On Error GoTo BrowseforFile_Err

   With Application.FileDialog(3)   '4=msoFileDialogFolderPicker
        '.InitialFileName = Me.pastdirectory
        If .Show Then Debug.Print .SelectedItems(1)

        BrowseforFile = Nz(.SelectedItems(1), "Computer\Nexus 7\Internal storage")

    End With

    'BrowseforFile = .SelectedItems(1)
    Exit Function

    Exit Function

    Resume BrowseforFile_RESUME
End Function

I have tried all the various file dialog options to return location and/or file name.  Then i will need to be able to copy the file to a set location.

Any ideas?
Jez Walters
Business Data Analyst

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros