Hi
Hope this is in the right place.
Fairly new to VB script. I am attempting to write a basic VBScript to count the files in a directory.
No problem So far I have this which works on standard directories:
Set fso = CreateObject("Scripting.FileSystemObject")
targetDir = "\\dir1\dir2\inter\pack\"
fileCount = fso.GetFolder(targetDir).Files.Count
However I have came across a Directory with an underscore in it which has stopped things working.
The path which does not work is : z:\Store\Interface\Tel_NG
Reading up I have discovered the underscore is used to split lines of code.
How do i Escape (or do i need to ) the underscore character?
Thanks in advance
Mike
Hope this is in the right place.
Fairly new to VB script. I am attempting to write a basic VBScript to count the files in a directory.
No problem So far I have this which works on standard directories:
Set fso = CreateObject("Scripting.FileSystemObject")
targetDir = "\\dir1\dir2\inter\pack\"
fileCount = fso.GetFolder(targetDir).Files.Count
However I have came across a Directory with an underscore in it which has stopped things working.
The path which does not work is : z:\Store\Interface\Tel_NG
Reading up I have discovered the underscore is used to split lines of code.
How do i Escape (or do i need to ) the underscore character?
Thanks in advance
Mike