Hello, i want to search several directories for files with the largest numbers behind them (Like "video123") . They dont have a datatype. But there are also files with longer names and datatypes in these folders (Like "video778.mp4"). Is it possible to filter the _FileListToArray Syntax from
to smth. like
Here is my Code
#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <array.au3> #include <File.au3> $filedir = @ScriptDir & "\" _checkfile() Func _checkfile() ConsoleWrite("______________________" & @CRLF) Local $arr = ["music", "picture", "video"] For $i = 0 To UBound($arr) - 1 Local $arrayfiles = _FileListToArray($filedir & $arr[$i], $arr[$i] & "*", 1) If @error = 1 Then ConsoleWrite($arr[$i] & "Error 1") EndIf If @error = 4 Then ConsoleWrite($arr[$i] & "Error 2") ;Exit EndIf $arrayfilter = _ArrayMax($arrayfiles, 0, 1) Global $stringfiles = StringReplace($arrayfilter, $arr[$i], "") ConsoleWrite($arrayfilter & @CRLF) Next EndFunc ;==>_checkfile
In a folder with some files that have no extension (for example the hosts file in C:\Windows\System32\driversetc), FileListToArrayRec does not return the same thing than _FileListToArray if I use *.* as filter :
_FileListToArray("C:\Windows\System32\driversetc", "*") : returns all files
_FileListToArray("C:\Windows\System32\driversetc", "*.*") : returns all files
_FileListToArrayRec("C:\Windows\System32\driversetc", "*") : returns all files
_FileListToArrayRec("C:\Windows\System32\driversetc", "*.*") : returns only files with extensions
It seems logic that FileListToArrayRec and FileListToArray should have the same behaviour with the same filter, no ?
It's not important at all for me, but maybe developers will want to ensure that these two functions react in the same way...
Edit : sorry if this post is not in the good section. Please move it if needed.
So im making a script that organizes TV shows. i have figured most of it out but im trying to find the portion of the title that contains the Season number and Episode number. (ie S01E13)
is there and easy way to search for the "S" and "E" in a string with any 2 random numbers in between them and after the "E"?
here is what i tried just as a very wild guess:
Func FindSeasonEpisode($FileName) $result = StringInStr($FileName, "S**E**") ConsoleWrite($result & @CRLF) EndFunc