pintas 0 Posted June 3, 2011 I want the _FileListToArray to display only '.docx' files, but i want the results to appear in _ArrayDisplay without the '.docx' in it. My thinking seems correct but the result tells me it's not. The _ArrayTrim would trim the results to the right in 5 characters. What is wrong with this? #include <Array.au3> #include <File.au3> $FileList =_FileListToArray('D:\WordDocs\','*.docx',1) $FileListNoDocx = _ArrayTrim($FileList, 5, 1) _ArrayDisplay($FileListNoDocx) Share this post Link to post Share on other sites
sahsanu 28 Posted June 3, 2011 What is wrong with this? #include <Array.au3> #include <File.au3> $FileList =_FileListToArray('D:\WordDocs\','*.docx',1) _ArrayTrim($FileList, 5, 1, 1) _ArrayDisplay($FileList) Share this post Link to post Share on other sites
pintas 0 Posted June 3, 2011 Yet again you saved me. Still don't understand why it doesn't work... Thanks! Share this post Link to post Share on other sites
sahsanu 28 Posted June 3, 2011 Yet again you saved me.Still don't understand why it doesn't work...Thanks!It doesn't work because _ArrayTrim function trims a certain number of characters from all elements in an array but DOES NOT create a new one so it is modifiying the existing array $FileList.You are welcome Share this post Link to post Share on other sites
pintas 0 Posted June 3, 2011 It doesn't work because _ArrayTrim function trims a certain number of characters from all elements in an array but DOES NOT create a new one so it is modifiying the existing array $FileList.You are welcome Ah, now i understand. Share this post Link to post Share on other sites