This SRE I came across whilst browsing the Include File.au3 (_FileListToArray) and felt that it should be given a Function all of its own. It use ByRef as a reference for the variable that is being passed to the Function and will either remove the trailing backslash or add a backslash. Function: ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GetDirectoryFormat ; Description ...: Formats a dir