Cool CoolWater
Thx
sheepdog
directories info??
Moderators: white, Hacker, petermad, Stefan2
Fine, but network issue
2CoolWater
Hello !
• Thanks, it works fine as recursive. I added it in the French forum.
However, a weird issue :
- in the network, when I display a XP-Pro workstation - all displayed dirs are shared, indeed -, it works for some dirs, while I get an error message for some others; something like :
- This is specially for a whole shared HD (storage only, not system)
Any idea ?
Kind regards,
Claude
Clo
Hello !
• Thanks, it works fine as recursive. I added it in the French forum.
However, a weird issue :
- in the network, when I display a XP-Pro workstation - all displayed dirs are shared, indeed -, it works for some dirs, while I get an error message for some others; something like :
Code: Select all
"Access denied "
Line : 21
Char. : 5
Code : 800A0046
Running error MS VB-Script
Any idea ?
Kind regards,
Claude
Clo
#31505 Traducteur Français de T•C French translator Aide en Français Tutoriels Français English Tutorials
2Clo
Hello,
well, the problem should be the "System Volume Information" folder...
to avoid this error message, just add to following line at the beginning of the script:
which means: ignore all errors, so the script is not terminated in case of any error. "dirty hack" but in this case i don't think further error handling is needed
Regards,
CoolWater
Hello,
well, the problem should be the "System Volume Information" folder...
to avoid this error message, just add to following line at the beginning of the script:
Code: Select all
On Error Resume Next
Regards,
CoolWater
Or you take possesion of the folder with 'cm_EditOwnerInfo'. That may help to have the right to access this folder.CoolWater wrote:well, the problem should be the "System Volume Information" folder...
sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
Patched by Paul V.
2Sheepdog & 2CoolWater
Hello !
• The user Vansumsen has patched alright the original script, to avoid these denied accesses errors. Below is the Paul's version :
It works fine in my LAN for the NTFS shared drive/dirs. which caused an error before from a Win 98SE reading…
Kind regards / VG
Claude
Clo
Hello !
• The user Vansumsen has patched alright the original script, to avoid these denied accesses errors. Below is the Paul's version :
Code: Select all
Set objArgs = WScript.Arguments
Set fso = CreateObject("Scripting.FileSystemObject")
SubDirCount = 0
CountRefused = 0
Refused = ""
For I = 0 to objArgs.Count - 1
If fso.folderExists( objArgs(I) ) then
Set folder = fso.GetFolder(objArgs(I))
LastPart = Mid(folder, InStrRev(folder, "\") + 1)
RecurseFolder folder, fso
If CountRefused <> 0 then
Refused = Chr(10) & Chr(13) & "Plus " & CountRefused & " which the access is denied by Windows !"
else
Refused = Chr(10) + Chr(13) + "None access has been denied by Windows"
end if
If LastPart <> "" then
Call MsgBox("The number of sub-dirs. in the active dir. '" + LastPart + "' is: " & SubDirCount & Refused , 64, folder)
else
Call MsgBox("The number of dirs. and sub-dirs in the active drive is: " & SubDirCount & Refused , 64, folder)
End If
End If
Next
Sub RecurseFolder(sPath, fso)
Dim fFolder, fSubFolders, fSubFolder
Set fFolder = fso.GetFolder(sPath)
Set fSubFolders = fFolder.SubFolders
On Error Resume Next
'Now recurse for each subfolder in the sPath folder...
For Each fSubFolder In fSubFolders
'*** Call self to recurse down folders
Call RecurseFolder(sPath & "\" & fSubFolder.name, fso)
If Err.Number <> 0 Then
CountRefused = CountRefused + 1
Else
SubDirCount = SubDirCount + 1
End If
Next
End Sub
'Original by W!ke76(http://www.eforum.de/showthread.php?s=&threadid=1356)
'Patched by «Le ouistiti»
Kind regards / VG
Claude
Clo
#31505 Traducteur Français de T•C French translator Aide en Français Tutoriels Français English Tutorials