Mrmovie, I appreciate the suggestions and will look outside of the script. I will also add error trapping. The files contain "EOF" when they copy completely so I'm wondering if I can determine success by looking for this.
I've manually re-run the script on the exact same file a second time and...
To be honest, this is the first and only VBscript I've ever written and it was several years ago so there certainly could be better ways to accomplish this.
strFile
-the full folder path and file name
CurrFileName = right(strFile, 18)
-captures the file name and extension in the string...
The script works perfectly 98% of the time and used to work 100% of the time until recently. Here's the full code:
strComputer = "." 'Local Computer running on this script
set objFSO = CreateObject("Scripting.FileSystemObject")
Set objWMIService = GetObject("winmgmts:" _
&...
Code snippet:
If (Not objFSO.FileExists("U:\UPS_Backup\Archive\" & CurrFileName & ".UPS" ) and Not objFSO.FileExists("U:\UPS_Backup\Archive\" & CurrFileName & ".txt" )) Then
If datevalue(CurrFile.DateCreated) = datevalue(now) Then
objFSO.CopyFile strFile, "U:\UPS_Backup\Archive\"...
My VBscript that has worked well for years copies text files between network folders. In recent months, the copied files are occasionally incomplete, with only 13-15 of the 20 records in the file. I added a wscript.sleep command for 1 minute to allow time for the copy but it still occurs. Any...
Help! I've been trying to do the same using CutePDF and I can't get it to work after days of trying. I can assign the printer to "PDF Writer" and that works great, but I can't get it to recognize the file location/name and bypass the "Save As" dialog box.
I'm new to setting registry values so...
I found a way around it. I kept removing more and more of the formatting on the report (like borders on the text boxes) and it seems to handle it without crashing now. Thanks anyway!
I have a report that contains a sub-report in Access 97. Both the report and sub-report work well independently. But when the sub-report is included in the main report, print-previewing the report causes the entire database to exit witout warning. I don't have any events on either report that...
I'm having this same kind of problem in Access 97, but I can't seem to find the Reference that I need. I get the User-Defined Type Not Defined error on:
Dim oSession As MAPI.Session
Under Tools, References, I do not show any of the refrences as MISSING. Does anyone know what reference is...
My computer reboots every time I try to look at any Access database report I've created, in both design and print preview views. This is the only time it occurs.
I'm running WIN2K and Access 97. Problem seems to have started after upgrading from WIN98 to 2K. Is the likely solution a conflict...
My computer reboots every time I try to look at any Access database report I've created, in both design and print preview views. This is the only time it occurs.
I'm running WIN2K and Access 97. Problem seems to have started after upgrading from WIN98 to 2K. Is the likely solution a conflict...
I have an Access 97 db running on Windows 2000 & some users get the error: The OLE server isn't registered. To register the OLE server, reinstall it.
The solution I find on microsoft.com says to relink the source file of the object. But I don't even have any OLE objects in the form. Any idea...
Using Calendar Control 8.0, is there a way to have the calendar display data from an underlying table? I have an attendance table with dates of absences, and my boss wants to view absences in a calendar in order to see patterns, like employee is sick every Monday & Friday. Thanks!
I have a report with calculated fields (sales per hour which divides sales by hours). I have the text boxes set as Fixed format, 2 decimal places. But in the report preview/printout it still shows many decimal places (1.3234234). Any suggestions? Thanks!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.