Microsoft Vbscript Runtime Error File Not Found
Contents |
360 games PC games 800a0035 file not found Windows games Windows phone games Entertainment All Entertainment
Vbs 800a0035
Movies & TV Music Business & Education Business Students & educators microsoft vbscript runtime error path not found Developers Sale Sale Find a store Gift cards Products Software & services Windows Office Free downloads & security Internet microsoft vbscript runtime error 800a004c Explorer Microsoft Edge Skype OneNote OneDrive Microsoft Health MSN Bing Microsoft Groove Microsoft Movies & TV Devices & Xbox All Microsoft devices Microsoft Surface All Windows PCs & tablets PC accessories Xbox & games Microsoft Lumia All Windows phones Microsoft HoloLens For business Cloud Platform Microsoft Azure Microsoft Dynamics Windows for business Office for business Skype for business Surface for business Enterprise solutions Small business solutions Find a solutions provider Volume Licensing For developers & IT pros Develop Windows apps Microsoft Azure MSDN TechNet Visual Studio For students & educators Office for students OneNote in classroom Shop PCs & tablets perfect for students Microsoft in Education Support Sign in Cart Cart Javascript is disabled Please enable javascript and refresh the page Cookies are disabled Please enable cookies and refresh the page CV: {{ getCv() }} English (United States) Terms of use Privacy & cookies Trademarks © 2016 Microsoft
FORUMSFOR COMPUTER PROFESSIONALS Log In Come Join Us! Are you aComputer / IT professional?Join Tek-Tips Forums! Talk With Other Members Be Notified Of ResponsesTo Your Posts Keyword Search One-Click Access To YourFavorite Forums Automated SignaturesOn Your Posts Best Of All, It's Free! Join Us! *Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail. Posting Guidelines Promoting, selling, recruiting, coursework and thesis posting is forbidden.Tek-Tips Posting Policies Jobs Jobs from Indeed What: Where: jobs by Link To This Forum! Add Stickiness To Your Site By Linking To This https://support.microsoft.com/en-us/kb/276011 Professionally Managed Technical Forum.Just copy and paste the BBCode HTML Markdown MediaWiki reStructuredText code below into your site. VBScript Forum at Tek-Tips HomeForumsProgrammersLanguagesVBScript Forum vbscript File Not Found error (but the file IS there) thread329-1546639 Forum Search FAQs Links MVPs vbscript File Not Found error (but the file IS there) vbscript File Not Found error (but the file IS there) mdProgrammer (Programmer) (OP) 5 http://www.tek-tips.com/viewthread.cfm?qid=1546639 May 09 09:18 I have a script which has been running fine for 3 years. It runs monthly, and on the 1st of each month, it copies the previous month's data to an archive folder and inserts the month and year into the filename. It works if I do it on my local computer, so I'm guessing it some sort of directory permissions issue, but I tried adding "everyone" as a user and giving all permissions and it still gives the error. I noted where the error occurs in the comments.Here's my code - Dim basePath' The path where the databases areDim filePath' The path where the databases are to be deleted and copied' Never set the filePath to the root directory!Dim fileExt' The file name andextension of the file(s) to be copied' Do not remove the "\"!' Set the variables - actual folder names and database names changed for this example.basePath = "\\dataServer\data" filePath = "\\dataServer\data\Database Folder"fileExt = "\SomeDatabaseString*.mdb"' Copy current database into database folder with month/year date stamp inserted into the filename.dim filesysset filesys=CreateObject("Scripting.FileSystemObject")filesys.CopyFile basePath & fileExt, filePath ' Copy files to new directoryDim fso,fSet fso = CreateObject("Scripting.FileSystemObject")Set f =
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site http://stackoverflow.com/questions/20406270/vbscript-reads-file-object-properties-but-wont-delete-the-file About Us Learn more about Stack Overflow the company Business Learn more about http://www.visualbasicscript.com/file-not-found-when-fully-specified-800a0035-m54093.aspx hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up vbscript reads File object microsoft vbscript properties, but won't delete the file up vote 0 down vote favorite Here is my (very simple) code: if fs.FileExists(strPath) then set thisFile=fs.GetFile(strPath) wscript.echo thisFile.Name & " (" & thisFile.Size & ") will be deleted" thisFile.Delete end if The path is correct, because I can read the file name and file size in the output. However, this is the output I'm getting: D:\Inetpub>cscript PDFDelete.vbs Microsoft microsoft vbscript runtime (R) Windows Script Host Version 5.8 Copyright (C) Microsoft Corporation. All rights reserved. 131_1443_cds101711.pdf (28660) will be deleted D:\Inetpub\PDFDelete.vbs(38, 3) Microsoft VBScript runtime error: File not found As you can see, I get the proper output on the file properties, so I know I have a valid reference to the file object, but trying to execute the Delete() method on that exact same file object produces a "File not found" error?! It makes no sense to me. How can the file be "not found" if I just accessed its name and size properties? EDIT I should have mentioned, I initially was using the code "fs.DeleteFile(strPath)" when I first got the "File Not Found" error. I changed it to the more direct "File.Delete()" method, but the error persists. vbscript filesystemobject cscript share|improve this question edited Dec 5 '13 at 17:17 asked Dec 5 '13 at 17:08 JMax2012 126214 add a comment| 2 Answers 2 active oldest votes up vote 0 down vote You can try: if fs.FileExists(strPath) then set thisFile=fs.GetFile(strPath) wscript.echo thisFile.Name & " (" & thisFile.Size & ") will be deleted" fs.DeleteFile strPath end if http://www.devguru.com/technologies/vbscript/14055 share|improve this answer answered Dec 5 '13
Posts : 3 Scores: 0 Reward points : 0 Joined: 12/7/2007 Status: offline file not found when fully specified -800a0035 Friday, December 07, 2007 5:36 AM (permalink) 0 Hello, I've searched the forum and didn't find any topics that were specific to my situation and hope you can help. I have a simple script to modify an IIS metabase.xml. When I manually run the following code from my server, it works great. When I run it from a batch file on my server, it works great. When I run it from a self extracting executable, it errors out with Line 5, 1 -file not found, 800a0035, ms vbscript runtime error. line 5 is: Set objFile = objFSO.OpenTextFile("C:\WINDOWS\system32\inetsrv\MetaBase.xml", ForReading) C:\WINDOWS\system32\inetsrv\MetaBase.xml does exist and if I pause the execution and manually run it while it is paused -it works!!!!!!!! I'm about to pull my hair out! Please help! Here is the full code: Const ForReading = 1 Const ForWriting = 2 Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFile = objFSO.OpenTextFile("C:\WINDOWS\system32\inetsrv\MetaBase.xml", ForReading) strText = objFile.ReadAll objFile.Close strNewText = Replace(strText, "c:\inetpub\wwwroot\", "d:\webcontent\wwwroot") Set objFile = objFSO.OpenTextFile("C:\WINDOWS\system32\inetsrv\MetaBase.xml", ForWriting) objFile.WriteLine strNewText objFile.Close #1 hamboy Total Posts : 92 Scores: 6 Reward points : 0 Joined: 7/11/2005 Status: offline RE: file not found when fully specified -800a0035 Friday, December 07, 2007 6:22 AM (permalink) 0 hi you will need to define Option Explicit and dim your variables for exec files #2 DiGiTAL.SkReAM Total Posts : 1291 Scores: 8 Reward points : 0 Joined: 9/7/2005Location: Clearwater, FL, USA Status: offline RE: file not found when fully specified -800a0035 Friday, December 07, 2007 3:20 PM (permalink) 0 Why would you say that? All Option explicit does is force yu to Dim all of your variables. Without it, it just means that you can implicitly declare a variable by creating it. Now, vbsnewbie. You mention a self-extracting executable. WHICH self-extracting executable? The one that Primalscript lets you create, or some other one? "Would you like to touch my monkey?" - Dieter (Mike Meyers) "It is better to die like a tiger, than to live like a pussy." -Master Wong, from Balls of Fury #3 vb