Syntax for copying a file from one folder to another

  • Thread starter Thread starter Jim Pockmire
  • Start date Start date
Seems simple, but how - filename also has blank characters.

Shouldn't be a problem, are you using the FileSystemObject? Have you
written any code?

Thanks,

Steve
 
Yes, but I don't know what to substitute for FileSystemObject e.g. I am
using

FileSystemObject.CopyFile "C:\MyFile" "C:\Temp\"

...which produces an error
 
Yes, but I don't know what to substitute for FileSystemObject e.g. I am
using

FileSystemObject.CopyFile "C:\MyFile" "C:\Temp\"

..which produces an error

This is what you need to do, complete with spaces in the filename
even:

Dim Fso As New Scripting.FileSystemObject
Fso.CopyFile "C:\Copy of imageonly.txt", "C:\temp\"
 
Even this is producing an error "User-defined type not defined"

That is because you need to make a reference to it in the VBA editor.
Tools/References/Browse, and choose c:\windows\system32\scrrun.dll
(Microsoft Scripting Runtime)
 
I'm not sure this is going to work, as I am deploying the app to other users
who won't know how to
 
I'm not sure this is going to work as I am deploying the app to other users
and they won't know how to do this.

Thanks,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top