Solved

"Path not found" using filecopy

Posted on 2014-12-21
7
86 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 45

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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…

744 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

10 Experts available now in Live!

Get 1:1 Help Now