Windows file system - path whit variable

  • 82 Views
  • Last Post 22 November 2018
Rosario Tumello posted this 19 November 2018

Hello,

i have the input folder whit AAA and BBB subfolder, i would that scanshare deposit the processed file in the output subfolder that have the same name of the input subfolder. for example

C:\input\AAA (input file)

C:\output\AAA (output file)

i tried to insert the following trigger script on the connector to WFS, but the result  was to obtain the processed file on the path c:\output\%SubFolders%.

 

Can you help me?On Error Resume next

StartingFolder=Metadata.Values("%ORIGINALFILENAMEWITHPATH%")

Set fso = CreateObject("Scripting.FileSystemObject") 

Set Folder = fso.GetFolder(StartingFolder) 

Set SubFolders = Folder.SubFolders 

Order By: Standard | Newest | Votes
luigi.zurolo posted this 21 November 2018

Ciao Rosario,

starting from v4.9.0 there is a specific variable containing the subfolder checked by the watch folder module, especially designed for this specific job without using any custom script.

The variable is called WATCHFOLDERSUBPATH and you can find it in the variables list of the 4.9.0 and above manual, appendix section.

Rosario Tumello posted this 22 November 2018

Thanks for support, i'haven't the 4.9.0 version, I solved the problem whit this trigger script:

 

On Error Resume next

StartingFolder=Metadata.Values("ORIGINALFILENAMEWITHPATHWITHOUTEXTENSION")

TEMP = "e:\output\" & MID(StartingFolder,10,8)

call Metadata.SetValues("PROVA1", TEMP)

 

  • Liked by
  • luca.scarpati
  • luigi.zurolo
Close