Setting $director from Regex of file location

View thread

rbpalmer2401

Hi All,

I need to change this format 'C:\logfile\directory1\directory2'

into '\logfile\directory1\directory2\'

using regex and the command

exec $directory =

this is to be able to set the destination folder the same as the location folder recursively