Here is my code (delete_thumbs.vbs):
Dim str
str = InputBox("Enter the path from where you want to delete thumbs")
Dim oShell
Set oShell = WScript.CreateObject ("WScript.Shell")
oShell.run "cmd /K CD /d & str"
I am willing to get the user input for the path of the folder by prompting them to enter the path using InputBox and then execute a command to delete all the Thumbs.db located in that folder.
Command to delete Thumbs.db
del /s /q /f /a:h Thumbs.db
The problem I am facing is that when I run "delete_thumbs.vbs" it prompts for user input to enter path of the folder but after the path is entered its not getting detected in CMD and it just prompts:
The system can not find the path specified
C:/Users/user/Desktop
Please guide me.Where am I going wrong