How do I delete a file in a folder by using a VBScript under using the Web Client

  • 187 Views
  • Last Post 07 July 2023
D.Fritsche1968 posted this 05 July 2023

Hi from Buxtehude, Germany

How do I delete a file in a folder by using a VBScript under using the Web Client?

How can I get the Variable %ORIGINALFILENAME% from the WEB Client and use it in the VB Script?

 

Dim objFSO, folderPath, fileName, filePath

folderPath = "C:\Input\Folder"

Set objFSO = CreateObject("Scripting.FileSystemObject")

fileName = Metadata.Values("ORIGINALFILENAME")

filePath = objFSO.BuildPath(folderPath, fileName)

objFSO.DeleteFile(filePath)

 

best regards

Dietmar

 

 

Order By: Standard | Newest | Votes
luca.scarpati posted this 07 July 2023

Hi Dietmar, 

 

here you can find a sample script that delete a specific file from %ORIGINALFILENAME% variable inside specific and fixed folder. 

Please remember that it works for the path inside the Server side environment not from the end user WebClient environment due to the WebClient is Web based and it is normal because the web client or the server don't have permission to do this steps user side.

 

Best regards,

Luca

D.Fritsche1968 posted this 07 July 2023

Hi Luca,

Thank you for your fast and uncomplicated support.

Best regards,

Dietmar

  • Liked by
  • luca.scarpati
Close