Hi
I have made and is using a VB script to check if a folder exist on 3 harddrives.
The VB script is called from a web browser and I have been using Internet Explorer, because it accepts running VB script.
Because Internet Explorer no longer exists in the new Windows 11, I have to find another solution to make the harddrive check.
I think that the best solution is converting the old script to Javascript, but I haven't been abel to make it work.
Can somebody help me with the script converting, and is Javascript the best solution ?
VB script Code:
' Verify that a Folder Exists
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FolderExists("O:\Økonomi mv\IT-staben\Test") Then
Set objFolder = objFSO.GetFolder("O:\Økonomi mv\IT-staben\Test")
Wscript.Echo "The folder TEST is found on O-drive"
Else
Wscript.Echo "Can't find the folder TEST on O-drive"
End If
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FolderExists("P:\Test") Then
Set objFolder = objFSO.GetFolder("P:\Test")
Wscript.Echo "The folder TEST is found on P-drive"
Else
Wscript.Echo "Can't find the folder TEST on P-drive"
End If
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FolderExists("Q:\") Then
Set objFolder = objFSO.GetFolder("Q:\")
Wscript.Echo "The folder TEST is found on Q-drive"
Else
Wscript.Echo "Can't find the folder TEST on Q-drive"
End If
-------------------------------------------------------------------------
Hope someone can help
Many regards
Henrik Kristensen
I have made and is using a VB script to check if a folder exist on 3 harddrives.
The VB script is called from a web browser and I have been using Internet Explorer, because it accepts running VB script.
Because Internet Explorer no longer exists in the new Windows 11, I have to find another solution to make the harddrive check.
I think that the best solution is converting the old script to Javascript, but I haven't been abel to make it work.
Can somebody help me with the script converting, and is Javascript the best solution ?
VB script Code:
' Verify that a Folder Exists
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FolderExists("O:\Økonomi mv\IT-staben\Test") Then
Set objFolder = objFSO.GetFolder("O:\Økonomi mv\IT-staben\Test")
Wscript.Echo "The folder TEST is found on O-drive"
Else
Wscript.Echo "Can't find the folder TEST on O-drive"
End If
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FolderExists("P:\Test") Then
Set objFolder = objFSO.GetFolder("P:\Test")
Wscript.Echo "The folder TEST is found on P-drive"
Else
Wscript.Echo "Can't find the folder TEST on P-drive"
End If
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FolderExists("Q:\") Then
Set objFolder = objFSO.GetFolder("Q:\")
Wscript.Echo "The folder TEST is found on Q-drive"
Else
Wscript.Echo "Can't find the folder TEST on Q-drive"
End If
-------------------------------------------------------------------------
Hope someone can help
Many regards
Henrik Kristensen