472,348 Members | 1,930 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,348 software developers and data experts.

FileSystemObject

Hello

I am using the FileSystemObject to copy files on a computer

Dim MyObject as Object

Set MyObject = CreateObject("Scripting.FileSystemObject")

MyObject .CopyFile "C:\My Documents\Test.txt", "C:\New Folder\Test.txt"



It seems to work OK; the file is being copied but when I write the

code it doesn't behave as if there is any References involved.

Ex: when I write MyObject . usually there is a dropdown window with
available

options that appears; this is not happening.

Also when I write copyfile it should automatically Ucase the c and f
(CopyFile) and

it doesn't do this either.

Is this normal for FileSystemObject?

Is there a better way to delete and copy files and folders?

Does anyone know what Reference FileSystemObject uses?

Last: I read at the following link :
http://support.microsoft.com/kb/q197953/

that bloating will occur when Data Access Objects (DAO) is used to create
objects

in a database; is it the same with the code I am using?

Dim MyObject as Object

Set MyObject = CreateObject("Scripting.FileSystemObject")

Thanks

G Gerard
Nov 4 '06 #1
1 16889
"G Gerard" <gg*****@nbnet.nb.cawrote in message
<Jm*******************@ursa-nb00s0.nbnet.nb.ca>:
Hello

I am using the FileSystemObject to copy files on a computer

Dim MyObject as Object

Set MyObject = CreateObject("Scripting.FileSystemObject")

MyObject .CopyFile "C:\My Documents\Test.txt", "C:\New
Folder\Test.txt"



It seems to work OK; the file is being copied but when I write the

code it doesn't behave as if there is any References involved.

Ex: when I write MyObject . usually there is a dropdown window with
available

options that appears; this is not happening.

Also when I write copyfile it should automatically Ucase the c and f
(CopyFile) and

it doesn't do this either.

Is this normal for FileSystemObject?

Is there a better way to delete and copy files and folders?

Does anyone know what Reference FileSystemObject uses?

Last: I read at the following link :
http://support.microsoft.com/kb/q197953/

that bloating will occur when Data Access Objects (DAO) is used to
create objects

in a database; is it the same with the code I am using?

Dim MyObject as Object

Set MyObject = CreateObject("Scripting.FileSystemObject")

Thanks

G Gerard
You are using late binding, so no references are involved.

You can switch to early binding by referencing Microsoft Scripting
Runtime, then declare and instantiate like this

Dim MyObject as Scripting.FileSystemObject
Set MyObject = New Scripting.FileSystemObject

In these NGs you will often be recommended to use FileCopy in stead,
as it doesn't need any references (member of VBA.FileSystem). Check
it out in the help files.

--
Roy-Vidar
Nov 4 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Marcelo Rizzo | last post by:
I am trying to get the name of a file with a specific extension (tmw) from several different directories. The problem I am having is that the...
5
by: John Dewbert | last post by:
*** post for FREE via your newsreader at post.newsfeed.com *** Hello, I have trouble passing a folder object (from a FileSystemObject) to a sub...
3
by: Steve | last post by:
Hi all, FileSystemObject question... I'm trying to check if files exist or not, but the files are not sitting on the same server as our...
2
by: Jason | last post by:
Hello, I'm posting here in the hopes that someone can give me a detailed synopsis of the ActiveX object, FileSystemObject, or even provide some...
2
by: Sean S - Perth, WA | last post by:
Hi all, If I create a FileSystemObject Object is it appropriate to reuse it to perform operations on different files/folders? Or should I...
9
by: kermit | last post by:
I keep seeing that you can use the FileSystemObject in either VB script, or Javascript on an aspx page. I added a refrence to the scrrun.dll...
2
by: Luis Esteban Valencia | last post by:
I'm trying to write a little VB.NET script in an ASP.NET web page that will create folders, move files, etc... pretty much everything you can expect...
3
by: nagmvs | last post by:
hello I have a problem with FileSystemObject in Vb Suppose i want to declare as Dim fs As New FileSystemObject, when i type New After that i...
12
lee123
by: lee123 | last post by:
why is this so hard to do. i have alot of books that have exaples of how to do these things but when i try the exaples they never work i have a...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
1
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.