473,382 Members | 1,648 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,382 software developers and data experts.

Object Required: 'FSO.GetFolder(...).Size' 800A01A8

This is my code:


Expand|Select|Wrap|Line Numbers
  1. sourcePath="C:\Users\DANI\Desktop\source\*.*"
  2. pastePath="C:\Users\DANI\Desktop\dest\"
  3.  
  4. set FSO=CreateObject("Scripting.FileSystemObject")
  5. FSO.CopyFile sourcePath, pastePath
  6. FSO.CopyFolder sourcePath, pastePath
  7.  
  8. set sourceSize=FSO.GetFolder(FSO.GetParentFolderName(sourcePath)).Size
  9. set pasteSize=FSO.GetFolder(pastePath).Size
  10. Do Until sourceSize=pasteSize
  11.     WScript.Sleep 1000
  12.     pasteSize=FSO.GetFolder(pastePath).Size
  13. Loop
  14. MsgBox "File copied successfully.", 0+64, "Success!"

I'm trying to make a VBS that copies all the files and folders from a folder into another folder and tells me "File copied successfully." when finished.
The problem is that it gives me an error:


For some reason even though I set FSO it still says it...
May 11 '17 #1
0 5244

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: David P. Jessup | last post by:
Quick question. When using GetFolder do I have to pass off the path in quotes or not? Set f = fso.getfolder("c:\path") or Set f=fso.getfolder(c:\path) Also, does anyone know if there is a...
2
by: Ajak | last post by:
Hi, I'm developing an ASP page on Win XP (IIS 5.1) which uses the the GetFolder method as below:- Set f = fso.GetFolder(fsDir) But everytime this line executes (when stepping in debugging...
7
by: google | last post by:
I am trying to use the following ASP code to examine the file names in a folder: Dim fso, f, fl, s, fs Set fso = CreateObject("Scripting.FileSystemObject") Set f =...
7
by: Raj | last post by:
I have developed a component create database, sql login,pwd, create tables etc., The component is working fine with VB But the same is not working with ASP as I get this error: Error 800a01a8...
10
by: jasone | last post by:
hi everyone! any advice given will be MUCH appreciated, i have spent about 10 hours on this bit of script... a rating system. I am having realt trouble overcoming this problem at runtime ...
2
rrocket
by: rrocket | last post by:
Anyone have a clue what I am doing wrong here? I have tried to call this function a bunch of different ways, but here is the latest: mProfitPercent = GetProfitPercent Here is the function...
1
by: gray d newbie | last post by:
Greetings All, I'm new to this forum as well as to ASP. Therefore I am ready to learn from the ASP experts in this forum. Thank you very much in advance. I was assign to develop a ASP based...
10
by: andersond | last post by:
On a webpage that has a variety of questions I get an "object required" error on lines like this... document.getElementById('tableQuestion17').style.visibility="visible"; This is the code...
1
by: fran7 | last post by:
Hi, I am trying to add a small count code snippet <% dim rst 'on error resume next set rst=conn.execute("Select count(*) from tblWatches where watchedProfileID = " & rs("ProfileID")) ...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.