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
as you know im on a very low autoit-level.
My question is: How can i read all PDFs from a Folder wich is open and copy them to a Folder on a Desktop.
The Folder wich contains the PDFs is variable Z:\Projektls\"*"*"*EVERYTIME ANOTHER ENDING"*"*"*"*"
There can be 1 PDF or even 15 PDFs.
i tried it with _FileListToArray and _FileCopy but i Need some help to understand this language
This is more tricky than I thought it would be. I have been searching for some time now and can't seem to find an answer.
To find the IE history manually I go to "C:UsersuserAppDataLocalMicrosoftWindowsHistory" and from there I select the subfolder(Today, Yesterday etc...) and check the files in it.
So following this logic I came up with this which should normally work but it doesn't.
#include <File.au3> #include <Array.au3> Local $File = RegRead ( "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders", "History" ) ;ConsoleWrite($File & @LF) Local $hSearch = _FileListToArray($File, Default, Default, True) _ArrayDisplay($hSearch) It returns some other files besides the Today, Yesterday folders.
I assume this happens because they are not actually folders however since FileListToArray second parameter is set to default, which means all files if I understand correctly, then it should also return the paths of theToday folder.
Anyone any ideas on this?
I'am trying to list files from folder sorted by name (same as the picture)
i tried this code
#include <File.au3> $arr = _FileListToArray("D:\2") _ArrayDisplay($arr) i am getting this result
Any one could explain why it is putting 10-1 before 8-1 ?
how can i make Autoit view file same as windows explorer ?