
lhk69
Active Members-
Posts
46 -
Joined
-
Last visited
lhk69's Achievements

Seeker (1/7)
0
Reputation
-
Get user to select files AND/OR folders, then "touch" them.
lhk69 replied to lhk69's topic in AutoIt General Help and Support
Well, basic or not, the UDF you have written should be hard coded into the AutoIt code and become included. I am VERY impressed, and once again,. thank you very much. Over the next few days, I "MAY" see the need for changes, but I doubt it. you have done WAY more for me than I could have ever expected. If you are ever close to Pittsbugh, I owe you as many beers as you want!! Lee -
Get user to select files AND/OR folders, then "touch" them.
lhk69 replied to lhk69's topic in AutoIt General Help and Support
Melba. Again. A miracle. This totally works. Just as you describe. It did NOT allow multiple selections of the same FILE OR FOLDER!! (Unless, of course I add 32) And I was able to delete selections by using CTRL. You are brilliant. How did you get SO good at this??? Thank you!! -
Get user to select files AND/OR folders, then "touch" them.
lhk69 replied to lhk69's topic in AutoIt General Help and Support
OH, by the way, I (of course) am now using your UDF rather than FileGetFolder. Im still too dumb to realize what I have INCLUDED!!.. You are THE MAN. Thank you. -
Get user to select files AND/OR folders, then "touch" them.
lhk69 replied to lhk69's topic in AutoIt General Help and Support
Melba. Just curious. How would YOU handle the implementation? Selecting files AND/OR folders, then looping on those selections and do a FileSetTime on them. First, Id put them in in an array, then loop each item in array and do a FileSetTime - including recursing chosen folders. By the way, is there a way to remove ONE item after youve selected it? AND, check to see if an item has already been added to prevent duplicates? Again, I think you for all your efforts. #cs ---------------------------------------------------------------------------- #include "ChooseFileFolder_Mod.au3" #include <array.au3> Local $sRet, $aRet Local $files, $afiles ; Local $sRootFolder = StringRegExpReplace(@AutoItExe, "(^.*\\)(.*)", "\1") Local $sRootFolder = FileSelectFolder("Choose a folder.", "") ; Register WM_NOTIFY handler $sRet = _CFF_RegMsg() If Not $sRet Then MsgBox(64, "Failure!", "Handler not registered") Exit EndIf $sRet = _CFF_Choose("Program - Archive Tool - Select multiple folders and/or files.", 300, 500, -1, -1, $sRootFolder, Default, 12 + 16, 20) If $sRet Then MsgBox(262144,'Debug line ~' & @ScriptLineNumber,'Selection:' & @lf & '$sRet' & @lf & @lf & 'Return:' & @lf & $sRet) ;### Debug MSGBOX $aRet = StringSplit($sRet, "|") $sRet = "" For $i = 1 To $aRet[0] $sRet &= $aRet[$i] & @CRLF Next MsgBox(64, "Program", "Selected:" & @CRLF & @CRLF & $sRet) MakeArray($aRet) _ArrayDisplay($afiles) Else MsgBox(64, "Program", "No Selection") EndIf Func MakeArray($sRet) If StringInStr($sRet, '|') = 0 Then $afiles = StringSplit($sRet, '\') Return $afiles[UBound($afiles) - 1] Else $afiles = StringSplit($sRet, '|') Return _ArrayToString($afiles, @CRLF, 2, UBound($afiles) - 1) EndIf EndFunc -
Get user to select files AND/OR folders, then "touch" them.
lhk69 replied to lhk69's topic in AutoIt General Help and Support
Melba. This is totally awesome. You really know what you are doing. I am VERY impressed. This is perfect. Thank you very much. -
Get user to select files AND/OR folders, then "touch" them.
lhk69 replied to lhk69's topic in AutoIt General Help and Support
thank you. -
Get user to select files AND/OR folders, then "touch" them.
lhk69 replied to lhk69's topic in AutoIt General Help and Support
Thanks Melba. I'll continue down the path that Kylomas set up for me. With a few minor tweaks, its enough to get me going. I anxiously await your solution, but PROMISE not to bug you. (heheh. BUG, no pun intended) Thanks again. -
Get user to select files AND/OR folders, then "touch" them.
lhk69 replied to lhk69's topic in AutoIt General Help and Support
Kylomas. This is great. I think I CAN get something going with this. I really appreciate your input. I thank you. Melba. I know you are right. I’m sure it will take two passes. You are a genius. If you say it cant be done the way I want to do it, then I’m sure it can’t. But, with that said, I really do appreciate your input. At least I’m not missing something stupid. AND, Melba, I guess I didn’t see the time/date change function. I will be using that instead. Like I said, you are brilliant!! I wonder how other applications achieve this function? I mean, I’ve seen it. Doesn’t something like winrar allow you select multiple files and folders in their GUI to add to an archive?? Anyway, thank you both very much. -
Apologize right off the bat. I am new and not very good at this. What I need is a script to present a GUI to get end users to be able select files and/or folders. Then loop in those selections, I assume put them in an array, and run a dos version of the UNIX "touch" command. I need to be able to change the time and date of a selected bunch of files and folders full of files. I have looked at scores of examples, UDF and other snippets. I am not sure exactly sure how to use Melba's UDF. Im just not sure exactly which direction to go. I can’t even get a basic GUI to select files AND folders. Please help me go in the right direction. Once I can get the GUI to get my user to be able to select files AND folders, I can make array and act upon the items from there. I could insert a bunch of attempts I’ve made here, but they are all already posted and examples I have used from posts. ANY help would be appreciated. Thank you.
-
Awesome. Cant thank you enough. I knew it was something stupid. The quotes MADE them strings, huh? Learned something. Thanks again. You truly are an MVP
-
Yeah, good call. But that string IS the name of an array. Should I be doing this some other way? Thanks - by the way.
-
Why in the world wont this work. The _ArrayDisplay. It dosent seem to work when I use a variable - in this case - $foldername. I am looping the elements in the array "$items" to process the items WITHIN those names. The loop works if I hardcode each element of $items in the for/next loop. But not when I loop through the elements of $items and call them and assign to $foldername. The messagebox HAS the correct information. Help please? Thanks in advance. I feel stupid. Global $cRootShareDirs[1] = ["DFSRoot"] Global $fRootShareDirs[2] = ["SCCM","SMSPKGSIG"] Global $gRootShareDirs[6] = ["Openshare","QuotaReports","Temporary","COR-CC-Media","USMT", $SiteCode & "_Sensitive1"] Global $rRootShareDirs[1] = ["ORbackup"] Global $OpenShareDirs[5] = ["Applications","GlobalShare","InfoShare","Personal","Teams"] Global $QuotaReportsDirs[3] = ["OnDemand","Scheduled","Incident"] Global $ORbackupDirs[3] = ["FSRM_Backup","Printer_Backup","DHCP_Backup"] Global $Items[7] = ["$cRootShareDirs","$fRootShareDirs","$gRootShareDirs","$rRootShareDirs","$OpenShareDirs","$QuotaReportsDirs","$ORbackupDirs"] $UpperLimit1 = UBound($Items,1) -1 For $LineNumber = 0 To $UpperLimit1 $FolderName = $Items[$LineNumber] MsgBox(0,"debug", "Element = " & $LineNumber & " is " & $FolderName) _ArrayDisplay ( $FolderName ) Next
-
command line wont run in server 2008 R2
lhk69 replied to lhk69's topic in AutoIt General Help and Support
Thinks Adam. Looks like I still have A LOT to learn. Thanks to ALL who contribute. LONG LIVE Auto-It!!! -
command line wont run in server 2008 R2
lhk69 replied to lhk69's topic in AutoIt General Help and Support
Very nice. MUCH better, more streamline code than mine. I am obviously a rookie. Thank you for the lesson. -
command line wont run in server 2008 R2
lhk69 replied to lhk69's topic in AutoIt General Help and Support
Adam. Thank you. That is new to me. I never knew I had to do anything like that. I will dig into the help file. Thanks again.