- VB script error path Path not found(800A004C)
- Const OSCPATH = "FmwiretestOutput"
- Const ALL_USERS_APPLICATION_DATA = &H23&
- Dim fso ' File System Object
- Dim objApplication ' Application object
- Dim objFolder ' Folder object
- Dim objFolderItem ' FolderItem object
- Dim fname ' Path to Settings folder
- Set objApplication = CreateObject("Shell.Application")
- Set objFolder = objApplication.Namespace(ALL_USERS_APPLICATION_DATA)
- Set objFolderItem = objFolder.Self
- fname = objFolderItem.Path & OSCPATH
- Set fso = CreateObject("Scripting.FileSystemObject")
- If fso.FolderExists(fname) Then
- Set objFolder = fso.GetFolder(fname)
- Else
- Set objFolder = fso.CreateFolder(fname)
- If Err Then
- Err.Clear
- strErr = SPOFOLDERFAIL
- rCode = 4
- End If
- End If
- Const OSCPATH = "FmwiretestOutput"
- Const ALL_USERS_APPLICATION_DATA = &H23&
- Set objApplication = CreateObject("Shell.Application")
- Set objFolder = objApplication.Namespace(ALL_USERS_APPLICATION_DATA)
- Set objFolderItem = objFolder.Self
- fname = objFolderItem.Path
- Set fso = CreateObject("Scripting.FileSystemObject")
- folders = Split(OSCPATH, "")
- For i = 0 To UBound(folders)
- fname = fso.BuildPath(fname, folders(i))
- If fso.FolderExists(fname) Then
- Set objFolder = fso.GetFolder(fname)
- Else
- Set objFolder = fso.CreateFolder(fname)
- If Err Then
- Err.Clear
- strErr = SPOFOLDERFAIL
- rCode = 4
- End If
- End If
- Next