GEOSoft Posted May 27, 2007 Posted May 27, 2007 (edited) I use several folder functions in my scripts so now I've decided to pull then together into a UDF.Right now this is a short list but as I standardize the variables and error handling for the others I'll add them to the list.The file is available for downloadFolder.zipexpandcollapse popup#include-once ;;<<<<<<<<<<<<<< [Ý[ÛÈÈÜÚÝÚ]Û]HX[YÙ[Y[ ÝÉÝÉÝÉÝÉÝÉÝÉݲfwC²fwC²fwC²fwC²fwC²fwC²fwC²fwC²fwC²fwC²fwC²fwC²fwC²fwC²fwC²fwC²fwC²fwC²fwìÐìÐì((ìôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô=============== ; Function Name: _FldrGetDates() ; Description: ReturnsHÜX]YÝ[ÙYYY[ÝXØÙÜÙY]È[[YÈÙHÛÈâ'&ࣲ7çF¢ôfÆG$vWDFFW2²b33c·$fÆG"²Âb33c´×Fô5FWB²Âb33íáÑ}Ñl°ÀÌØíQ}QáÐuuut¤(ìAɵÑȡ̤èÀÌØíɱȴQ¡½±ÈÑ query (default is current dir) ; $Mth_AsText - Return the monÈ^ Y][ HÙHÈ]H[YXÈ]BÂBBBBBBBBIÌÍÑ^ÑFRÒb6WBFò&WGW&ç2FR&rFFRâb6WBFòFVfVÇB&WGW&ç2f÷&ÑÑÑÍÑÉ¥¹(ì$$$$$$$$$ÀÌØíQ}Qáд%ÍÐѼġձФ¹Ñ¡Ñ = current day then replaces the date with "Today at" ; Requireme ÊNÈ][YJÊNÝXØÙÜÈH]È[^HÛÛZ[[ÈH]W2æBFÖW2öbFRföÆFW"vW&P£²'&³ÒÒFFT7&VFV@£²$$$$$$$%ÉÉålÉtôÑ1ÍÑ5½¥¥(ì$$$$$$$$$$$%ÉÉålÍtôÑ1ÍÑÍÍd ; Failure Sets @Error ; 1 - unable to create thH[TÞÝ[HØXÝÈBBBBBBBBBBBBBBBLH ÌÍÜÙÈÝ^ÝÈ]]"2¢tTõ6ög@£³ÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓôôôôôôôôôôôôôôôôôôôô()Õ¹}±ÉÑÑÌ ÀÌØíɱÈôÌäìÌäì°ÀÌØí5Ñ_AsText = 1, $Ext_Date = 1, $T_Txt = 1) If $rFldr <> ÌÎNÉÌÎNÈSÕ[Q^ÝÊ ÌÍÜH[]Ù]Ü ÌÎNVæ&ÆRFòÆö6FRFRföÆFW"b33²fײ5$Äbfײ5$Äbfײb33c·$fÆG"$ÀÌØí½¨ô=© ÉÑ ÅÕ½ÐíMÉ¥ÁÑ¥¹¹¥±MåÍѵ=©ÐÅÕ½Ðì¤(%%%Í=¨ 36;obj) Then If $rFldr = '' Then $rFldr = @HomeDrive &aÈ ÌÎNÉÌLÉÌÎNÈ [ÈÛYT]BIÌÍÛÑH ÌÍÛØÙ]Û Ì3c·$fÆG" Æö6Âb33cµ'FâÒb33²b33° vFb33c¶ôfÆG FÒb33c´e÷ɽÁlÍtôl¹Ñ ÉÑ°¹Ñ1ÍÑ5½¥¥°¹Ñ1ÍÑÍÍt(($$%½ÈÀÌØí$= 0 To Ubound($F_Prop) -1 $Rtn &= _FldrDate($F_Prop[ÌÍÒWK ÌÍÓ]ÐÕ^ ÌÍÑ^Ñ]K ÌÍÕÕ H [È ÌÎNß ÌÎNÂæW@ VæEvF &WGW&â7G&æu7ÆB7G&æuG&Õ&vBb33cµ'FâÃÂb33·ÂÌäì¤(%±Í($%IÑÕɸMÑÉÉ½È Ä°Ä°ÌäíU¹±Ñ¼ÉÑÑ¡¥±MåÍÑ´½ect')) EndIf EndFunc ;<===> _FldrGetDates() ;===============OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOBÈ[Ý[ÛæÖS¢ôfÆG$vWE6¦R£²FW67&Föã¢&WÆ6VÖVçBf÷"FRF$vWE6¦Rչѥ½¸Ñ¡ÐÝ¥±°ÉÑÕɸѡͥéÌåÑÌ°-̽È5Ì(ìMå¹Ñàè}±ÉÑize([$rFldr [,$Set_Ext ]]) ; Parameter(s): $rFldr - The foÈ]YH Y][ÈÝ[BÂBBBBBBBBH ÌÍÔÙ]Ñ^HYH YVÇB&WGW&ç2FR6¦R26÷vââFRFW67&Föââb6WBFòFVâ&WGW&çѡ͵̥ÉÑM¥é ¤(ìIÅեɵ¹Ð¡Ì¤è(ìIÑÕɸY±Õ¡Ì¤èMÕÍÌthe date as defined by $Set_Ext ; Failure Sets @Error ; BBBBBBBBBBBLHH[XHÈÜX]HHØXÝÈBBBBBBBBBBBBBBBLH ÌÍÜ"FöW2æ÷BW7B£²WF÷"2¢tTõ6ög@£³ÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô()Õ¹}±ÉÑM¥é ÀÌØíɱ = '', $Set_Ext = 1) If $rFldr <> '' AND NÕ[Q^ÝÊ ÌÍÜH[]Ù]Ü ÌÎNÕ[XHÈØØ]FRföÆFW"b33²fײ5$Äbfײ5$Äbfײb33c·$fÆG" b33c¶ö&¢Òö& ÉÑ ÅÕ½ÐíMÉ¥ÁÑ¥¹¹¥±MåÍѵ=©ÐÅÕ½Ðì¤(%%%Í=¨ ÀÌØí½¨¤Q¡¸($%f $rFldr = '' Then $rFldr = @HomeDrive & '\&ÌÎNÈ [ÈÛYT]BIÌÍÛÑH ÌÍÛØÙ]Û ÌÍÜBBIÌc´eõ6¦RÒb33c¶ôfÆG"ç6¦P bb33cµ6WEôWBfÇC²fwC²FVâ&WGW&âb33c}M¥é($$ÀÌØí¥ØôÀ(($%]¡¥±ÀÌØí}M¥éÐìÄÀÈÐ($$$ÀÌØí}M¥éô36;F_Size / 1024 $Div += 1 Wend If $Div = 0 Then Retur ÌÍÑÔÚ^H [È ÌÎNÈ]ÉÌÎNÂBQ[ÙRY ÌÍÑ]HH[BBT]&÷VæBb33c´eõ6¦RÂ2fײb33²¶"b33° VæD` &WGW&â&÷VæBb33c´eõ6é°È¤µÀìÌäì5Ìäì(%±Í($%IÑÕɸMÑÉÉ½È Ä°Ä°ÌäíU¹±Ñ¼Éte the FileSystem object')) EndIf EndFunc ;<===> _FldrGetSize BÏOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOÓÓÓÓÓÓÓУ²gVæ7FöâæÖS¢ôfÆG$vWE&VçB£²FW67&Föã¢vWBFRF¼Ñ¡ÁɹнѡÍÁ¥¥½±È(ìMå¹Ñàè}±ÉÑAɹСlÀÌØíɱ]) ; Parameter(s): $rFldr - The folder to query (default is current BÈ]Z[Y[ ÊNÈ][YJÊNÝXØÙÜÈH]ÈH]FR&VçBföÆFW"vF÷WBG&Æær&6·6Æ6£°fÇW&R6WG2ÉɽÈ(ì$$$$$$$$$$$$$$$$Ä´Õ¹±Ñ¼ÉÑÑ¡½©Ð(ì$$$$$$$$$$$$$$$$È´$rFldr does not exist ; Author(s): GEOSoft() ; Modification(s): ;ÝJÊNÈ^[JÊNÏOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÐ ¤gVæ2ôfÆG$vWE&VçBb33c·$fÆG"Òb33²Ìäì¤(%%ÀÌØíɱȱÐìÐìÌäìÌäì99=P¥±á¥ÍÑÌ ÀÌØíɱȤQen Return SetError( 2, 2, 'Unable to locate the folder' & @CRLF [ÈÔ [È ÌÍÜBIÌÍÛØHØÜX]J ][ÝÔØÜ[Ë[T7FVÔö&¦V7BgV÷C² b4ö&¢b33c¶ö&¢FVà bb33c·$fÆG"Òb33²b33²¡¸ÀÌØíɱÈô!½µÉ¥ÙµÀìÌäìÀäÈìÌäìµÀì!½µAÑ ($$ÀÌØoFldr = $obj.GetFolder($rFldr) Return $oFldr.ParentFolder.]Q[ÙBBT]Ù]ÜKK ÌÎNÕ[XHÈÜX]HH[TÞÝ[HØ7Bb33² VæD`¤VæDgVæ0 £³ÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô(ìչѥ½¸9µè}±É ½Áå5½Ù ¤(ìÍÉ¥Áion: Copy or Move folders with dialog ; Syntax: _FldrCopyMove(Folder toØÙÜËÝ[][ÛÛËXÝ[ÛJBÈ[Y]ÊN ÌÍÜHHgVÆÂFöbFRföÆFW"Fò6÷÷"Ö÷fP£²b33c¶äfÆG"ÒFRgVÆÂÑ ½Ñ¡ÍÑ¥¹Ñ¥½¸½±È(ì$$$$$$$$$ÀÌØíÑ¥½¸´Q¡Ñ¥½¸Ñ¼ÁÉrm 0 = Copy (default, 1 = Move ; Requirement(s): ; Return Value(s): SuØÙÜÈHÛÈÛÜYYÈ[ÝYÈBBBBBBBBHHZ[HÙ]ÈÜÈBBBBBBÒVæ&ÆRFò7&VFRFR6VÆÂö&¦V7@£²"ÒFR7V6fVBÀÌØíɱÈÝ̹½Ð±½Ñ¡¡¬Ñ¡ÁÑ ¤(ì$$$$$$$$$$$Ì´¸¥¹Ù±¥ion was specified ; Author(s): GEOSoft ;=================================OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOB[ÈÑÛÜS[ÝJ ÌÍÜG"Âb33c¶äfÆG"Âb33c¶7FöâÒ bäõBfÆTW7G2b33c·$fÆG"FVâ&WGɸMÑÉÉ½È È°È°ÌäíU¹±Ñ¼±½ÑÑ¡½±ÈÌäìµÀì I1µÀìCRLF & $rFldr) If $action <> 0 AND $action <&gÈH[]Ù]ÜËË ÌÎNÒ[[YXÝ[ÛÌÎNÊBIÌÍÛØHØÜVFRgV÷Cµ6VÆÂäÆ6FöâgV÷C² b4ö&¢b33c¶ö&¢FVà bäõBfÆá¥ÍÑÌ ÀÌØí¹±È¤Q¡¸¥É ÉÑ ÀÌØí¹±È¤($$ÀÌØí±ÈôÀÌØí½¨¹9meSpace ($nFldr) If $action = 0 Then $cFldr.CopyHere (&ÌÍÜK [Ò [ÂBQ[ÙBBBIÌÍØÑ[ÝRH ÌÍÜK [´f×° VæD` VÇ6P &WGW&â6WDW'&÷"ÂÂb33µVæ&ÆRFò7&VFRFR6±°½©ÐÌäì¤(%¹%)¹Õ¹ì±ÐìôôôÐì}±É ½Áå5½Ù ¤((ìôôôôôôôôôô==================================================================== ; Func[Û[YNÑÛÛÜÚ[Û BÈØÜ[ÛÛÛÜÈÜXÛÛÜÈHÆFW"ࣲ7çF¢ôfÆG$6ö×&W76öâb33c·$fÆG"²Âb33c¶7FöåÒ£²&ÖWFW¡Ì¤èÀÌØíɱȴQ¡½±ÈѼÁɽɴѡѥ½¸½¸¸(ì$$$$$$$$$ÀÌØítion - Action to perform -- 0 = Compress (default), 1 = Decompress ; Requi[Y[ ÊNÈ][YJÊNÝXØÙÜÈHÛÛÜÙÈÜXÛÛÜÙÈH7V6fVBföÆFW £°fÇW&R6WG2W'&÷ £²"Òb3ØíɱȽ̹½Ðá¥ÍÐ(ì$$$$$$$$$$$$$$$$Ì´%¹Ù±¥Ñ¥½¸ÍÁ¥¥¸5UMPe 1 or 0 ; Author(s): GEOSoft ; Example(s): ; $Cpr = _FldrCompressio ][ÝÐÎÌLÕÝ ][ÝÊHÎÈÛÛÜÈHÛÎÌLÕÝÈYÜFVâ×6t&÷Âb33´W'&÷"b33²Âb33c´7"£°£²b33c´7"ÒôfÆG$6ö×&W76öâÅÕ½ÐíèÀäÈíQÍÐÅÕ½Ðì°Ä¤ìì½µÁÉÍÌÑ¡½±ÈèÀäÈíQÍÐ(ì%Éor Then MsgBox(0, 'Error', $Cpr) ;============================OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOB[ÈÑÛÛÜÚ[Û 33c·$fÆG"Âb33c¶7FöãÒ bäõBfÆTW7G2b33c·$fÆG"FVâ&WGW&â6WÉÉ½È È°È°ÌäíU¹±Ñ¼±½ÑÑ¡½±ÈÌäìµÀì I1µÀì I1amp; $rFldr) If $action <> 0 AND $action <> 1 T[]Ù]ÜËË ÌÎNÒ[[YXÝ[ÛÌÎNÊBRYÕÝ[Ò[Ý Ìc·$fÆG"Âb33²b3#²b3#²b33²FVâb33c·$fÆG"Ò7G&æu&WÆ6Rb33c·$fÆÈ°ÌäìÀäÈìÌäì°ÌäìÀäÈìÀäÈìÌäì¤($ÀÌØíɱÈô ¡È Ì䤵Àì036;rFldr & Chr(39) $objWMIService = ObjGet("winmgmts:" [È ][ÝÞÚ[ÛÛ][Û][Z[ÛÛ]_IÌÌÎÉÌLÉÌLËÌLÜÛÝ Ì#¶6×c"gV÷C² b33c¶6öÄföÆFW'2Òb33c¶ö&¥tÔ6W'f6RäWV5VW'gV÷Cµ6VШɽ´]¥¸ÌÉ}¥ÉѽÉäݡɹµôÅÕ½ÐìµÀìÀÌØíɱȤ(%½ÈÀÌ;objFolder in $colFolders If $action = 0 Then $errResulÈH ÌÍÛØÛÛÛÜÂBQ[ÙBBBIÌÍÙÝ[ÈH ÌÍÛØÛä6ö×&W70 VæD` æW@¤VæDgVæ2²fÇC³ÓÒfwC²ôfÆG$6ö×&W76öâb33c·$fÆG"ÂÀÌØíÑ¥½¸ôÀ¤((ìì±Ðì±Ðìôô!±ÁÈչѥ½¹ÌôôÐìÐì(ìì)Õ¹}±Éte($Dt, $Ext_Date, $Mth_AsText, $T_Txt) Local $Td^HHRY ÌÍÑ^Ñ]HH[] ÌÍÑSØØ[ ÌÍÑÜÓ[ÛHG&æu7ÆBb33´¦çV'ÄfV''V'ÄÖ&6Ä&ÇÄÖħVæWħVÇÄVwW7GÅ6WFVÖ&W'=ѽÉñ9½ÙµÉñµÈÌäì°ÌäíðÌäì¤(%1½°ÀÌØíäôMÑÉ¥¹1Ð 36;Dt, 4) Local $m = StringMid($Dt,5,2) Local $d = StringMY ÌÍÑ ËBRY ÌÍÞHHYXS ÌÍÛHH[ÛS ÌÍÙHYFVâb33cµFFÒ Æö6Âb33c·BÒ7G&ætÖBb33c´GB b33c·BÒ7G¥¹1Ð ÀÌØíаȤµÀìÌäìèÌäìµÀìMÑÉ¥¹5¥ ÀÌØíа̰ȤµÀì9;:' & StringRight($t, 2) If StringLeft( $t, 2) < 12 [BIÌÍÝ [ÏH ÌÎNÈ[IÌÎNÂQ[ÙBBIÌÍÝHÝ[ÓY ÌÍÝÒ"fײ7G&ætÖBb33c·BÂ2 b33c·Bf׳Òb33²Òb33° VæD` bÀÌØíQäôÄ9ÀÌØí5Ñ¡}ÍQáÐôÄ9ÀÌØíQ}QáÐôÄQ¡¸IÑÕɸÌ;Today at ' & $t If $Mth_AsText = 1 Then $m = $ÑÜÓ[ÛÉÌÍÛWBT] ÌÍÛH [È ÌÎNÈ ÌÎNÈ [È ÌÍÙ [È Ì²b33²fײb33c·fײb33²Bb33²fײb33c·@¤VæDgVæ2²fÇC³ÓôÐì}±ÉÑ ¤(oÝ÷ ØLZ^±«¢+Ø(¥¹±Õ±Ðí½±È¹ÔÌÐì(ÀÌØí±ÈôÅÕ½ÐíèÀäÈí]¥¹½ÝÌÀäÈíMåÍÑ32" MsgBox(0,'Parent',' Parent folder: ' & _FldrGe[ ÌÍÑJBÙÐÞ ÌÎNÔÚ^IÌÎNË ÌÎNÑÛÚ^N ÌÎNÈ [ôfÆG$vWE6¦Rb33c´fÆG" ¢b33c´fEô'&ÒôfÆG$vWDFFW2b33c´fÆG"¤bÉɽȱÐìÐìÄQ¡¸(½ÈÀÌØí$ôÄQ¼ÀÌØí}ÉÉålÁt(%5Í ½à À°#39;TEST Rtn',$Fd_Array[$I]) Next EndIf _FldrCopyMove(&qwÝÐÎÌLÔÚXÝÉ][ÝË ][ÝÐÎÌLÐÚ]I][ÝÊB ÌÍÐÜHÑö×&W76öâgV÷C´3¢b3#µFW7BgV÷C²³²6ö×&W72FRföÆFW"gV÷C´3¢b3#µEÍÐÅÕ½Ðì(%ÉɽÈQ¡¸5Í ½à À°ÌäíÉɽÈÌäì°ÀÌØí ÁȤ((ÀÌØí ÁÈ _FldrCompression("C:\Test", 1) ;; Decompress the folder &qwÝÐÎÌLÕÝ ][ÝÂYÜ[ÙÐÞ ÌÎNÑÜÌÎNË ÌÍÐÜBLike I said, this is just the start of the list.EnjoyEdit: _FldrGetDates() works like FileGetDate() which will not work on folders so you use it to return the date/time of folders.Edit 2 Added the _FldrCopyMove() functionEdit 3 May 29 2007 Added the _FldrCompression Function to compress/decompress folders. Edited June 23, 2007 by GEOSoft George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
ConsultingJoe Posted May 28, 2007 Posted May 28, 2007 Very cool, good job Check out ConsultingJoe.com
GEOSoft Posted May 28, 2007 Author Posted May 28, 2007 Very cool, good jobThanks @CyberZeroCoolIf I get some time today I'll add a couple more. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
GEOSoft Posted May 28, 2007 Author Posted May 28, 2007 Updated with _FldrCopyMove() which copies or moves the specified folder with the progress dialog. The default is to copy the folder. Set $action to 1 if you want to move the folder. I'll try to add the _FldrCompress() and _FldrUncompress() functions either later today or tomorrow. See post #1 I also added a link for the file download in the first post. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
GEOSoft Posted May 29, 2007 Author Posted May 29, 2007 Updated with folder compression function to allow compress/decompress of a folder. changed a few of the error returns but no script breakers. The download file is updated See the first post The next will probably be _FldrSubFolders() and _FldrAttribs() George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
randallc Posted June 23, 2007 Posted June 23, 2007 (edited) Hi, These look good; have you done anymore? a list of All subfolders below a given folder would be quick this way perhaps? Best, randall [PS I thought I saw a script recently on forum, but can't find it...] Edited June 23, 2007 by randallc ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW
smstroble Posted June 23, 2007 Posted June 23, 2007 Nice functions. P.S. you should change description on folderCompress . MUHAHAHAHAHA
poisonkiller Posted June 23, 2007 Posted June 23, 2007 Nice UDFs, but I noticed that you example script is kinda messed up, MsgBox is missing an "'"...
GEOSoft Posted June 23, 2007 Author Posted June 23, 2007 Nice UDFs, but I noticed that you example script is kinda messed up, MsgBox is missing an "'"...I'm missing something here then. All I see is that I used single quotes instaed of doubles and that works just fine. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
GEOSoft Posted June 23, 2007 Author Posted June 23, 2007 Nice functions.P.S. you should change description on folderCompress .ThanksDone. I wrote a script that writes those headers for me, I should train myelf to use it more often instead of copy/paste. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
GEOSoft Posted June 23, 2007 Author Posted June 23, 2007 Hi, These look good; have you done anymore? a list of All subfolders below a given folder would be quick this way perhaps? Best, randall [PS I thought I saw a script recently on forum, but can't find it...]I already have a recursive folder search function posted but I could also add another one in here. I was kind of saving this UDF for things that the standard AutoIt folder functions won't handle like using the Windows dialogs for copy/move. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
strate Posted August 28, 2007 Posted August 28, 2007 (edited) I get the following errors: #include <Folder.au3> $a_FolderAttr = _FldrGetDates('G:\Packaging\Process Sheets') If @Error <> 1 Then For $I = 1 To $a_FolderAttr[0] MsgBox(0, 'TEST Rtn',$a_FolderAttr[$I]) Next EndIf C:\AutoIt3\beta\Include\Folder.au3(40,72) : ERROR: syntax error Return SetError(1, 1, 'Unable to create the FileSystem object')) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\AutoIt3\beta\Include\Folder.au3(80,72) : ERROR: syntax error Return SetError(1, 1, 'Unable to create the FileSystem object')) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\AutoIt3\beta\Include\Folder.au3(108,72) : ERROR: syntax error Return SetError(1, 1, 'Unable to create the FileSystem object')) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\AutoIt3\beta\Include\Folder.au3(136,37) : ERROR: syntax error $cFldr.CopyHere ($rFldr), ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\AutoIt3\beta\Include\Folder.au3(34,78) : ERROR: _FldrDate(): undefined function. $Rtn &= _FldrDate($F_Prop[$I], $Mth_AsText, $Ext_Date, $T_Txt) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ Edited August 28, 2007 by strate INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station...
GEOSoft Posted August 28, 2007 Author Posted August 28, 2007 I get the following errors: #include <Folder.au3> $a_FolderAttr = _FldrGetDates('G:\Packaging\Process Sheets') If @Error <> 1 Then For $I = 1 To $a_FolderAttr[0] MsgBox(0, 'TEST Rtn',$a_FolderAttr[$I]) Next EndIf C:\AutoIt3\beta\Include\Folder.au3(40,72) : ERROR: syntax error Return SetError(1, 1, 'Unable to create the FileSystem object')) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\AutoIt3\beta\Include\Folder.au3(80,72) : ERROR: syntax error Return SetError(1, 1, 'Unable to create the FileSystem object')) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\AutoIt3\beta\Include\Folder.au3(108,72) : ERROR: syntax error Return SetError(1, 1, 'Unable to create the FileSystem object')) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\AutoIt3\beta\Include\Folder.au3(136,37) : ERROR: syntax error $cFldr.CopyHere ($rFldr), ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\AutoIt3\beta\Include\Folder.au3(34,78) : ERROR: _FldrDate(): undefined function. $Rtn &= _FldrDate($F_Prop[$I], $Mth_AsText, $Ext_Date, $T_Txt) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^Call it a coincidence but I'm working on that very issue right at the moment. I've a hunch it has to do with a change in AutoIt because they all workedfine previously. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now