Jump to content

Remove files from directories


Recommended Posts

The below is my new code fo the delete script. I run 3 calls of the UDF as I want to get rid of the unnecessary files and any file that has sample in its name and any directories named sample

#region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Run_Tidy=y
#endregion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <RecFileListToArray.au3>
#include <Array.au3>

$path = $CMDLINE[1]
$exclude = "*.*; *.*|*.mp4; *.f4v; *.avi; *.mpg; *.wmv; *.flv; *.mkv; *.mov; *.jpg; *.png; *.gif; *.nfo"
$include = "*sample.*"
$include2 = "sample"

FileChangeDir($path)
Local $FileList = _RecFileListToArray($path, $exclude, 1, 1, 1, 2)
Local $FileList2 = _RecFileListToArray($path, $include, 1, 1, 1, 2)
Local $FileList3 = _RecFileListToArray($path, $include2, 2, 1, 1, 2)
_ArrayDisplay($FileList)
_ArrayDisplay($FileList2)
_ArrayDisplay($FileList3)
If $FileList[0] = 1 Then
FileDelete($FileList[1])
MsgBox(4096, "File Deleted", 5)
Else
For $i = 1 To $FileList[0]
FileDelete($FileList[$i])
Next
MsgBox(4096, " Files Deleted", $i, 5)
EndIf
_ArrayDisplay($FileList2)
If $FileList2[0] = 1 Then
FileDelete($FileList2[1])
MsgBox(4096, "File Deleted", 5)
Else
For $i = 1 To $FileList2[0]
FileDelete($FileList2[$i])
Next
MsgBox(4096, " Files Deleted", $i, 5)
EndIf
If $FileList3[0] = 1 Then
DirRemove($FileList3[1])
MsgBox(4096, "Dirs Deleted", 5)
Else
For $i = 1 To $FileList3[0]
DirRemove($FileList3[$i],1)
Next
MsgBox(4096, " Dirs Deleted", $i, 5)
EndIf

This worked great. Its alot neater and shorter then my previous script. Its also nice and fast and it only displays the arrays if stuff is found. Now the only thing not working in this is the DireRemove call at that bottom of the script. The UDF is finding directories and creating the array but the DirRemove is not working in the For loop. I have a one line script that works fine with DirRemove but the code I have is not working in this script.I can't figure it out. I display the array that the UDF creates for picking up all the directories called Sample and it shows 12 of them. But its not looping through the array and removing them. Not sure what the issue is.

Edited by sparker366
Link to comment
Share on other sites

  • Replies 74
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Moderators

sparker366,

Firstly you can simplify the code even more - there is no need to check for the single file case. Each of the loops can be altered like this: ;)

; Check if you got any files returned - otherwise you will get an error when you try to access the array
If IsArray($FileList) Then
;If $FileList[0] = 1 Then
;    FileDelete($FileList[1])
;    MsgBox(4096, "File Deleted", 5)
;Else
    For $i = 1 To $FileList[0]
        FileDelete($FileList[$i])
    Next
    ; Now if you really want to make the "File/Files" distinction
    $sText = "File"
    If $FileList[0] > 1 Then $sText &= "s"
    ; And $i will always be one more than the number you deleted - so why not use the real count?
    MsgBox(4096, $FileList[0] & " " & $sText & " Deleted", $i, 5)
EndIf

As to why the folders are not being deleted I have no idea. I suggest that you do some errorchecking and see what you get returned from the DirRemove command for each folder - that might give us a clue. You might also look to see if the folders you are trying to delete have any strange attributes - something like this:

If IsArray($FileList3) Then
    For $i = 1 To $FileList3[0]
        $sAttribs = FileGetAttrib($FileList3[$i])
        $iRet = DirRemove($FileList3[$i], 1)
        ConsoleWrite($iRet & " - " & $FileList3[$i] & " - " & $sAttribs & @CRLF)
    Next
    MsgBox(4096, " Dirs Deleted", $i, 5)
EndIf

Let me know what you get as a return in the SciTE console. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Well I got it working. Your code snippet gave me the needed solution. The first UDF call was erroring out as there is nothing for it to find as its all been deleted. I never checked if it was a valid array so the first deletion for loop was dying causing the script to terminate. I added the IsArray check to each deletion routine and it fixed it. Not sure why I never gave a thought to checking if it was a valid array.

Now the first set of code you put in that post I removed the single delete like you suggested but the last part of it I don't follow.

; Check if you got any files returned - otherwise you will get an error when you try to access the array
If IsArray($FileList) Then
;If $FileList[0] = 1 Then
; FileDelete($FileList[1])
; MsgBox(4096, "File Deleted", 5)
;Else
For $i = 1 To $FileList[0]
FileDelete($FileList[$i])
Next
; Now if you really want to make the "File/Files" distinction
$sText = "File"
If $FileList[0] > 1 Then $sText &= "s"
; And $i will always be one more than the number you deleted - so why not use the real count?
MsgBox(4096, $FileList[0] & " " & $sText & " Deleted", $i, 5)
EndIf

Again Melba23 you have saved me. Why didn't it dawn on me to check if the array was getting built. That was causing me errors yesterday too due to the command line path issue.

So here is my new code

#region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Run_Tidy=y
#endregion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <RecFileListToArray.au3>
#include <Array.au3>

$path = "d:\newsgroups\pron\"
$exclude = "*.*; *.*|*.mp4; *.f4v; *.avi; *.mpg; *.wmv; *.flv; *.mkv; *.mov; *.jpg; *.png; *.gif; *.nfo"
$include = "*sample.*"
$include2 = "sample"
$i = 0

FileChangeDir($path)
Local $FileList = _RecFileListToArray($path, $exclude, 1, 1, 1, 2)

Local $FileList2 = _RecFileListToArray($path, $include, 1, 1, 1, 2)

Local $FileList3 = _RecFileListToArray($path, $include2, 2, 1, 1, 2)

_ArrayDisplay($FileList)
_ArrayDisplay($FileList2)
_ArrayDisplay($FileList3)
If IsArray($FileList) Then
    For $i = 1 To $FileList[0]
        FileDelete($FileList[$i])
    Next
EndIf

If IsArray($FileList2) Then
    For $i = 1 To $FileList2[0]
        FileDelete($FileList2[$i])
    Next
EndIf

If IsArray($FileList3) Then
    For $i = 1 To $FileList3[0]
        DirRemove($FileList3[$i], 1)
    Next

EndIf
Edited by sparker366
Link to comment
Share on other sites

  • Moderators

sparker366,

There are some good coding lessons in this thread! :D

What do you not follow about the second part? All it does is to create a small string which, depending on the number of files, reads "File" or "Files" - it adds an "s" to the original "File" if there is more than 1 file to delete. Then we show the same MsgBox as you did in your script except that we show the correct number of files (you were showing the loop counter after the loop had terminated so it is always one more than the actual count). Looking now I see I miswrote the MsgBox line - try this instead:

MsgBox(4096, "Deleted", $FileList[0] & " " & $sText, 5)

Clearer now? :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Moderators

sparker366,

Again - no need to apologise. The whole idea is that you understand. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Well i just tweaked the script a bit more. I added a log file to it. I used the _FileWriteLog UDF to record each file deleted. It will also write a line for every file that had sample in it and also every sample directory deleted.

The log file is not working. I am adding some troubleshooting code to it now. Will check back later.

So now my script is complete. Not sure about doing the ini file stuff. It may be a not needed addition.

Edited by sparker366
Link to comment
Share on other sites

Well again I thought that the fileopen command would create a file but I was wrong. I was not getting anything written to my log file as the file didn't exit. I do some checks to make sure the fileopen command was successful and it came back successful. I then created the file manually and my log started working. So I am going to redo my code so that after the fileopen I do a fileexists and if that fails then do a filecreate to create the file.

This is a great learning experience. Sometimes very frustrating but all in all fun.

Now I am going to take it one step further and after the script ends display the log file. I have to figure out how to do that. A bit digging into the docs may be in order. I have a feeling its going to be some type of GUI control to display it but will figure that out tomorrow.

Link to comment
Share on other sites

  • Moderators

sparker366,

This is a great learning experience

But a rather frustrating teaching one. You need to start giving us some code rather than just saying "The log file is not working" - it is very hard to guess from that phrase (which ought to be banned from the forum) just what might be wrong. You do give some clues in the next post - but without the actual code you used we are really just whistling in the wind. :whistle:

From what you have posted so far I offer this very thin, but logical, melody: :D

- _FileWriteLog does not create a file for you - you need to define a path or the use the handle returned from FileOpen as it explains in the Help file.

- FileOpen will not automatically create a file - the default is to open the file for reading. If you want the file to be created you need either write or overwrite mode - again explained in the Help file (do you notice a trend here?). Which mode were you using?

Let us see the code you have written that has not worked - then you will get more focused help. And both your and our frustration levels will hopefully not rise as quickly. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

I had posted code to create a log in plain text file, (1st page) you can add the delete function, have you even tried it?

Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Link to comment
Share on other sites

Melba23 yes I didn't add any code snippet not sure why but i didn't. Maybe cause I was still troubleshooting it and wanted to get it on my own. Sorry about that.

The below code is working.

#region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Run_Tidy=y
#endregion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include
#include
#include


$path = $cmdline[1]
$logfile = "d:logs\dellog.log"
$exclude = "*.*; *.*|*.mp4; *.f4v; *.avi; *.mpg; *.wmv; *.flv; *.mkv; *.mov; *.jpg; *.png; *.gif; *.nfo"
$include = "*sample.*"
$include2 = "sample"
$i = 0

;Open log file.
Local $File = FileOpen($logfile, 1)
If $File = -1 Then
MsgBox(0, "Log File Error", "Unable to open file.Exiting Script", 5)
Exit
Else
MsgBox(0, "Log File ", "Log file Opened", 5)
EndIf
FileChangeDir($path)
Local $FileList = _RecFileListToArray($path, $exclude, 1, 1, 1, 2)

Local $FileList2 = _RecFileListToArray($path, $include, 1, 1, 1, 2)

Local $FileList3 = _RecFileListToArray($path, $include2, 2, 1, 1, 2)

_ArrayDisplay($FileList, "Files to Delete")
_ArrayDisplay($FileList2, "Sample Files")
_ArrayDisplay($FileList3, "Sample Directory")
If IsArray($FileList) Then
For $i = 1 To $FileList[0]
FileDelete($FileList[$i])
_FileWriteLog($File, $FileList[$i], -1)
Next
EndIf

If IsArray($FileList2) Then
For $i = 1 To $FileList2[0]
FileDelete($FileList2[$i])
_FileWriteLog($File, $FileList2[$i], -1)
Next
EndIf

If IsArray($FileList3) Then
For $i = 1 To $FileList3[0]
DirRemove($FileList3[$i], 1)
_FileWriteLog($File, $FileList3[$i], -1)
Next

EndIf
FileClose($File)

I do read the help file alot and I do google alot.

I created the path and the file myself since my code wasn't. As you can see in the code the file is opened in write mode. As you can see I test for successful opening and post a msgbox. If it fails then I post a message box and exit the script.

The rest of the script works like before. After the deletions I write a log entry. The whole initial issue was the file didn't exist and the _FileWriteLog was not working. Again sorry for not posting my code after my statement about the log file not working but I did state what I was going to attempt and if that didn't work I figured I would post my code. i will get in the future habit of posting code with any issues I post about.

careca I apologize but your post about the log file code didn't register fully with me. I didn't realize you had posted it or I would have used that instead of the buitl in function. In the future I will get in the habit of rereading the post to make sure nothing was mentioned prior that could assist me.

What I need to do is figure out why the file was not created with the fileopen statement I used. I did go through the help file for that command and nothing indicated why.

Next to venture into the GUI controls and figure out how to display the log file after the script finishes. I guess the simple way would to use the run command run notepad pass it the log file path and name and use that to display it.

Edited by sparker366
Link to comment
Share on other sites

  • Moderators

sparker366,

Did the D:log folder exist when you tried to open the file? If not then you need to add the "8 = Create directory structure if it doesn't exist" mode as well. When I do that the file is created without problem (path adjusted for my setup): ;)

$logfile = "m:\logs\dellog.log"

$File = FileOpen($logfile, 10)

As to displaying the file, you could always use a read-only edit control in your own GUI - but using Notepad is not a bad idea. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

What I need to do is figure out why the file was not created with the fileopen statement I used. I did go through the help file for that command and nothing indicated why.

Hi, i couldnt see anywhere in the function documentation that fileopen should create the file.

EDIT too late lol

Edited by careca
Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Link to comment
Share on other sites

  • Moderators

careca,

Hi, i couldnt see anywhere in the function documentation that fileopen should create the file

From the Remarks section for FileOpen in the Help file:

"Opening a file in write mode creates the file if it does not exist. Directories are not created unless the correct flag is used"

New spectacles needed perhaps? :D

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Actually I don't recall if it existed lol. I just looked at the timestamp for the directroy and it was 3hrs after that post so I am assuming that it wasn't there.

$File = [url="http://www.autoitscript.com/autoit3/docs/functions/FileOpen.htm"]FileOpen[/url]($logfile, 10)
What does the 10 flag do? I looked in the help file and didn't see it. Am I missing something? Now if the file exists in that path I still should test for a successful fileopen?

Melba23 I applaud you for not barking too hard at me. I know I have been a frustrating poster.

I had a serious illness back in 98 and that caused some memory issues with me and could be causing me not to register everything when reading. I do have short term memory loss issues it has gotten a great deal better in the 14+ yrs since the illness.

Link to comment
Share on other sites

  • Moderators

sparker366,

Open the Help file to the FileOpen page and then look at the various options under "mode" in the "Parameters" section. We use 10 because that is 2 (open for writing and overwrite any existing file) + 8 (create the folder structure if required). As it says at the top of that section, the parameter: "Can be a combination of the following" - so we combine the modes we require for our script. All clear now? :)

And you can either check for the existence of the file handle returned from the function (anything other than -1 means it was successful) or use FileExists to check - I would probably go for the former as it is faster. ;)

As to being patient, I rarely get annoyed with those who want to learn - and you are a lot less frustrating than some I have met here! :D

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

New spectacles needed perhaps? :D

Damn deficit of attention disorder! LOL

Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Link to comment
Share on other sites

  • Moderators

sparker366,

Not exactly. If the file does not previously exist then 9 and 10 are functionally identical. However, 10 will delete an existing file whereas 9 will let you add data to it. In either case using _FileWriteLog as you are doing will write to the end of the file regardless of the mode in which it was opened - it is just a question of whether you want a file containing the data from that particular run of your script - or whether you want to keep the data from the previous runs and add the data from this run to the already existing file. Clear? :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...