If something is neither true nor false, what is it? Scripting Concepts and Technologies for System Administration Script Runtime Primer FileSystemObject FileSystemObject Reading and Writing Text Files Reading and Writing Text Files Reading and Writing Text Files Managing Disk Drives Returning Stop the Help Vampires:http://slash7.com/2006/12/22/vampires/ VB is NOTVB.Net which is NOTVBA which is NOTVBScript #5 mcgyver74 Total Posts : 6 Scores: 0 Reward points : 0 Joined: 3/14/2006 Status: offline RE: File line 2. weblink
I know this would be easier in pure VB or even C++, but I'm trying to do it in VBS.
On Error Resume NextConst ForReading = 1Const ForAppending = 8Const OverwriteExisting 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! Icon Legend and Permission New Messages No New Messages Hot Topic w/ New Messages Hot Topic w/o New Messages Locked w/ New Messages Locked w/o New Messages Read Message Post New File line 3. https://www.experts-exchange.com/questions/21501728/error-codes-FileSystemObject.html
Edited by Frederik Long Saturday, August 31, 2013 1:26 PM Saturday, August 31, 2013 11:07 AM Reply | Quote 0 Sign in to vote Here is a partial fix to demo The content you requested has been removed. Also in regards to jrram has suggested, What i am doing is very similar to what you have suggested but more complex in some areas and less complex in the way The line that is giving the error is "For Each TempFolder In MoreFolders".
These are the constants. For example, the following script reads a text file, echoes the contents of that file back to the screen, and then attempts to repeat the procedure: Copy Set objFSO = CreateObject("Scripting.FileSystemObject") There is no substitute for understanding of what is happening. On Error Goto 0 These are the constants.
Text files can be used to hold arguments that would otherwise need to be typed at the command line or hard-coded into a script; rather than typing 100 server names at Vbscript Copyfile Error Handling File.Ext .GetFolder(strPath) - Returns an object referring to the path. .GetParentFolderName(strPath) - Returns a string referring to the path. \Path\To\ .GetSpecialFolderName(FolderType) FolderType=SystemFolder/TemporaryFolder/WindowsFolder .GetStandardStream(Type [,Unicode (True/False)]) .GetTempName() .MoveFile(Source, Dest) .MoveFolder(Source, Dest) .OpenTextFile(strFile Files opened in this mode can only be read from. http://stackoverflow.com/questions/2659071/vbscript-catching-erroring-varialble-value No need to reinvent the wheel and Robocopy is about the best wheel I've seen for the job.
The script must: Create an instance of the FileSystemObject. Nor can I seem to find them on the net. That can only happen if your file system is corrupted. Example: