473,326 Members | 2,173 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 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 17038
"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 program stops working on the second pass with an run...
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 procedure. Consider the following code: ...
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 Intranet. Basically we have about 5000 photos in a...
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 good links about it. These are the questions that...
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 create a new FileSystemObject Object for each file and...
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 I added importing namespaces for 'System.Object',...
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 to do using the FileSystemObject library. Is...
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 can't see FileSystemObject in derived DropDownList. ...
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 previous post on "copying files" some of the other guys...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.