Solved

"Path not found" using filecopy

Posted on 2014-12-21
7
90 Views
Last Modified: 2014-12-22
I am completely baffled on this one.
FileCopy "O:\test150.jpg", "C:\test155.jpg"

Open in new window

results in "Path not found"

And I assure you that the test150.jpg does exist on the "O:" drive.

It seems as though it is only working for "C:" drive transfers only.
0
Comment
Question by:hrolsons
7 Comments
 
LVL 46

Expert Comment

by:Martin Liss
ID: 40512150
Name "O:\test150.jpg" As "C:\test155.jpg"
0
 
LVL 17

Accepted Solution

by:
Chris Millard earned 500 total points
ID: 40512163
Are you by any chance trying to do this on Vista/Win 7/Win 8 etc? It's quite possible that it is the OS causing the issue. VB Classic is (obviously) quite old now, and some functions will fail without error.

What about if you try to compile the code then run as administrator, or try disabling UAC.

UAC might also be the problem by not allowing you to copy into the root of C:. Could you perhaps change the destination folder just in case it's a UAC issue?
0
 

Author Comment

by:hrolsons
ID: 40512211
@Martin - I still get "path not found"

@Chris - You hit the nail on the head!!!  Turned off UAC and everything is cooperating now.  Thank You!!!
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 17

Expert Comment

by:Chris Millard
ID: 40512214
UAC is a pain in the rear end sometimes. Glad you found the problem though.
0
 
LVL 68

Expert Comment

by:Qlemo
ID: 40512522
You shall not copy to C:\. That's why UAC is preventing you from doing so.
0
 
LVL 17

Expert Comment

by:Chris Millard
ID: 40512568
@Qlemo - that has already been said above :-)
0
 
LVL 17

Expert Comment

by:Chris Millard
ID: 40513480
@hrolsons - please would you be kind enough to close the question and allocate the points now that the question has been successfully answered? Thanks.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now