Jump to content

Search the Community

Showing results for tags 'Folder'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 21 results

  1. How can I get a full name for a folder that starts with "data_" and ends with random numbers and characters? I want to get a folders name inside Temp Directory. Not sure how to even start. 🤭 Any suggestions? 🤔
  2. I like and have been using TeraCopy, a third party program, for many years. Mostly it is a great program, but it does have some issues. On Windows XP for instance, Thumbs.db files could often hold up a copy or move process until the user manually responded to the error prompt. Some other issues I discuss below. PLEASE NOTE - I am not related to or affiliated in any way with the 3rd party TeraCopy program developers. ALSO NOTE - I myself have only tested TeraCopy Cure at this point, on Windows 7 (32 bit), and only with the free version of TeraCopy 2.27. This program, TeraCopy Cure, is related to another one of my TeraCopy assistant programs, TeraCopy Timer, but aims at being simpler and quicker to use ... if lacking its more advanced features. TeraCopy Cure is a frontend for TeraCopy and sets out to make up for its flaws and limitations. One of those flaws is queuing order, and the limitation relates to a same destination issue. You would think that queue order would be the same as add order, but that is not the case, and if you are doing a mix of COPY and MOVE then the COPY process could easily fail. It could fail with some source items, even if the COPY process has already started before the same source MOVE process begins ... especially if the destination folder is on the source drive ... only the currently copying file is locked to that process. If you drag and drop another source for a same destination as an existing or impending COPY or MOVE process, then usually TeraCopy nicely adds it for you to that existing job. However, you might wish to avoid that, or it might occur during the testing phase of that active process, and then not be properly processed etc. But you are not given a choice and it just gets added. HOW TO USE See the right-click menu of the 'Batch List' (lowest field) and the right-click menu of the Tree field, for some useful options. (1) If desired, enable 'Auto Start'. NOTE - Even if enabled, this can be bypassed. (2) Set the destination folder, either by browsing on the tree or by dragging a folder to the Destination input field or label. Right-clicking on a folder in Explorer will also work, if enabled. The destination folder path will also show in the Tree if that right-click option is enabled. (3) Then drag & drop source file or folder onto one of three five areas - Folder (Drive) Tree field, or COPY or MOVE buttons ... this now also includes the source input and label. NOTE - If the Folder (Drive) Tree field is used, then you will additionally need to click either the COPY or MOVE button, to have that job added to the Batch List ... but this avoids 'Auto Start' if it is enabled. Drag & dropping to the buttons instead, saves on clicking, but starts the first job etc immediately if 'Auto Start' is enabled. (4) If needed and ready, click the START button to run the first job and those that follow. More information is included in program and in the NOTES etc sections below. WARNING - Depending on the amount of content on your destination drive, and folder level depth, and the speed of your PC, display of the full path in the Folder (Drive) Tree can take a while to show ... if you have that (right-click) option enabled ... it isn't by default. I found this feature quite tricky to get right, and I'm still not 100% sure it is now full-proof. (source is included) TeraCopy Cure v1.6.zip (source is included) NOTES UPDATES INFORMATION OLDER DOWNLOADS
  3. Using the FTP FTPEx.au3 makes communicating with FTP a breeze. With great functions like _FTP_FileGet, _FTP_FilePut, and _FTP_DirPutContents, you can upload and download with ease. But what about the much needed ability to download a folder with a simple _FTP_DirGetContents function? Well I put together a function that will download a folder with ease... _FTP_DirGetContents Function: Func _FTP_DirGetContents($oConn, $opath, $olocal, $orec) If Not FileExists($olocal) Then DirCreate($olocal) If StringRight($opath, 1) <> "/" Then $opath &= "/" If $orec == 1 Then Local $ocurrent = _FTP_DirGetCurrent($oConn) _FTP_DirSetCurrent($oConn, $opath) Local $afolders = _FTP_ListToArray($oConn, 1) _FTP_DirSetCurrent($oConn, $ocurrent) For $o = 1 To $afolders[0] If $afolders[$o] == "." Or $afolders[$o] == ".." Then ContinueLoop If Not FileExists($olocal & "\" & $afolders[$o]) Then DirCreate($olocal & "\" & $afolders[$o]) _FTP_DirGetContents($oConn, $opath & $afolders[$o], $olocal & "\" & $afolders[$o], $orec) Next EndIf Local $hFTPFind Local $aFile = _FTP_FindFileFirst($oConn, $opath, $hFTPFind) While 1 _FTP_FileGet($oConn, $opath & $aFile[10], @ScriptDir & "\tmpdata\" & $aFile[10]) $aFile = _FTP_FindFileNext($hFTPFind) If @error Then ExitLoop WEnd _FTP_FindFileClose($hFTPFind) EndFunc Example Usage: #include <FTPEx.au3> If Not FileExist(@ScriptDir & "\ftptemp") Then DirCreate(@ScriptDir & "\ftptemp") $dir_local = @ScriptDir & "\ftptemp" $dir_remote = "/" Local $iOpen = _FTP_Open('MyFTP Control') Local $iConn = _FTP_Connect($iOpen, "YourFTPServer", "YourUsername", "YourPassword") _FTP_DirGetContents($iConn, $dir_remote, $dir_local, 1) _FTP_Close($iConn) _FTP_Close($iOpen) Function Call Explanation: _FTP_DirGetContents($oConn, $opath, $olocal, $orec) $oConn: session handle as returned by _FTP_Connect. $opath: The remote folder to download $olocal: The local folder to download to. $orec: set to 1 to download folder and subfolders. Set to 0 for non recursive. Enjoy
  4. i have a script that selects a text file and deletes a line (text input required) in the text file selected i have to make it remove all lines found on a file i name, toRemoveLines.txt it has to remove lines from all text files found in a folder this is the script that has to be modified where it says "select file" it has to be "select folder" where it says "line text input" it has to be all lines from a text file #Include <File.au3> Global $success = False $file_name = FileOpenDialog("Select file", @ScriptDir, "All files (*.*)", 1+4) $line_text_input = InputBox("Line's text", "Line must contain following text:", "line contains this text") $file_count_lines = _FileCountLines($file_name) for $i = 0 to $file_count_lines $Lines_text_output = FileReadLine($file_name, $i) if StringInStr($Lines_text_output, $line_text_input) then _FileWriteToLine($file_name, $i, "", 1) $success = True ExitLoop EndIf Next if $success = True Then MsgBox(0, "Success", "Line has been deleted") Else MsgBox(0, "Failure", "Line wasn't found") EndIf
  5. Hello I have a query please It is about windows file explorer If i design a tool in autoit language to delete files for example and i added it in the context menu in File Explorer If i right-click on any file And you choose the tool, it will be get the path of the selected file or folder The problem here is If i select a set of files or folders it only detect the first one The code that i used is if $CMDLine[0] = 0 then msgBox(16, "error", "you don't selecte any files") exit else for $i = 1 to $CMDLine[0] msgBox(0, "files", $CMDLine[$i] next endIf exit
  6. Hi All, I am fairly new to AutoIT and I am still trying to learn, I have been using _FileListToArray to list all the files with a particular extension in an array and then loop through it for operation ( For $i = 1 To UBound($FileArray) - 1). So far this has been working fine. But I am not able to figure out a problem that I have; what if I have 50 files but I only want to loop through first 10 files and then next ten and so on? Or rather I should say, how I can I only feed max 10 files to the array at a time when I do _FileListToArray regardless of the total number of files in the folder? Any insight/help will be much appreciated
  7. Hey Everybody, 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 THANKS!
  8. How can you get the downloads folder in AutoIT? As far as i know there isn't a macro for it right? like @Downloads or something? The ugly solution would be typing in the whole path but what if the user has chosen another location? Need to clear that folder regularly on my work and on different accounts.. regards, TheAutomator
  9. We can get a list of file using the below code. Local $aFileList = _FileListToArray(@DesktopDir, "*") Is there any option to use the above one recursively to get sub folders and their contents also.?? And also, is there any way to serialize the above array locally to some file and load it later when we want in another program on another machine so that we can compare its contents with a folder in different machine, which is not network connected also.?
  10. Generally we will use tools like Winmerge or Beyond Compare for this purpose. Are there any UDF or libraries available in AutoIT to compare any two files or folder contents.
  11. Version 1.0.3.2

    2,163 downloads

    Do a backup of a folders list
  12. Whats is the best method to know if a specific folder has changed his files. In my case I want to check if pictures in my folder have been changed or not. (If someone is interest in future plans I want to count afterwards the files in that folder, but that is not important now) Can anyone help me out, I though of something like getting the current modification date and comparing it somehow with the future one but I do not know if something like that is even possible. SO basically again I "Just" want to check if a specific folder ( files in that folder) have been changed.
  13. How to select a folder and assign the path value to a variable in autoit? ; Selecting a file and assigning that to $sPath value) Case $file $sPath = FileOpenDialog("Open a file", @desktopdir, "Cabinet Files (*.cab)",$FD_MULTISELECT) GUICtrlSetData($file, $sPath) ; How to do the same with a folder? Case $folder $sPath = FileSelectFolder($sPath, "")Need the selected folder path to be used in the $sPath section for further implementation. Or a method to Select Folder or Files at once.
  14. Hi, I'm trying to do a very basic file search with recursive folders search (I'm trying to select each WMV movie in my hierarchy and run a converter on it). I've found different versions of "_FileListToArrayRec" around - each with different variables or included "au3" files in the top of the File.au3. Neither of them worked "out of the box" and required me to do a bunch of changes. After many errors I finally managed to get one version to semi-work - but can't get it to work completely. This is the code that I'm using: Local $WMV_Array = _FileListToArrayRec($Root_Folder, "*.wmv", 1, 1, 0, 2) Although the second flag is set to 1 (recursive) it doesn't do that. It always just shows the files in the root folder. It seems to be unable to process the entries of folders as folders. I'll be happy to try other methods - if there are simple ones for this simple task. I can do it so easily in dos (dir /s /b *.wmv) I don't know why it should be complicated with AutoIt. Thanks, Dani.
  15. BlockIt Utility is designed to block Files and Folders. (Main idea for this utility by rasim) Screenshot: Changelog: Download: BlockIt_Beta.zip (Counter: )
  16. This is a very little program, just to see all fileformats, count,... in a folder and its subdirectorys. If there are Audio/Videofiles, the length of all files will be shown. Maybe you find it helpful. FolderFileInfo_source.zip
  17. The below script is used by me before for copying files/folders with progress bar(windows default progress bar). I found similar option for moving by using same object. But not able to find for delete. dml.vbs (This is a vbscript one and I am posting in this forum because autoit is made on top of vbscript and it might have similar functions.) So, I checked in AutoIT forums and found below script files and which I have been modified for my requirement. In those below I found delete2.au3 is working fine but hanging during deletion of huge memory files/folders. Delete1_au3 Delete2_au3 Delete3_au3 Please try to provide a solution.
  18. Hello programmers it's been awhile since my last topic but I stumbled on something strange.. make an Autoitscript and put this in it: soundplay("file.wav",1) then make a bunch of folders inside of other folders and put the script with the wav file into the deepest folder: new folder000new folder001new folder002new folder003new folder003new folder005new folder006new folder007new folder008new folder009new folder010my_autoitscript.au3 file.wav then try to play the sound file with your autoitscript... the sound does not play but if i place the script with the sound file a few folders up, it works. hope you can help me and thanks for reading my post, TheAutomator
  19. I know this question has been asked, and has even been answered ( for example), but even after reading through the AutoIT commands and trying to reverse engineer the fantastic script Varian put together, I'm still having trouble, and I was hoping for some help. Basically, I have a script that runs once an hour, every hour, duplicating a folder into a backup location and stamping it with a date and time stamp. I'm using the simple DirCopy command with some rudimentary macros. An example of what I'm talking about follows: DirCopy("[SOURCE DIR]", "[TARGET DIR]\[" & @MON & "-" & @MDAY & "-" & @YEAR & "]-[" & @HOUR & @MIN & " Hours]", 1) Obviously I've replaced the source and target directories in the above example. When run, the source folder is copied to a \Backups\ alternate folder, as shown in the following examples: - ...\Backups\[07-06-2012]-[0000 Hours] - ...\Backups\[07-06-2012]-[0100 Hours] - ...\Backups\[07-06-2012]-[0200 Hours] - ...\Backups\[07-06-2012]-[0300 Hours] - ...\Backups\[07-06-2012]-[0400 Hours] This goes on for a 24 hour cycle, reaching 2400 hours, at which point the date rolls over and the whole process starts again. The obvious problem is that I don't want these backup folders filling up the entire drive. Therefore, I'd like to add functionality to the script to purge any backup folders previously created which are more than a few days old. Again, I've reviewed the commands in the linked article, and I've done my best to reverse engineer the linked script, but I just can't get it to work. My goal isn't to have an interactive script, but rather to have a script that will run unattended on its own without user intervention. If the script is attended, I might as well just go in and manually purge the old files. I hate to ask someone else to do my work for me, but I'm at the end of my rope with this particular issue. If anyone can (and is willing) to help, I'd really appreciate it. Thanks, Bob
  20. Have you ever wanted to make your script copy itself to the startup folder but not every time. And when the user removes it it can be a pain. But now with my new add-on your script is always there. ;any includes you may have If not FileExists(@StartupDir & "/" & "your script's name.exe") Then FileCopy(@ScriptFullPath, @StartupDir) EndIf ;=========== ;=========== ;your script here ;=========== ;=========== Have Fun!
  21. _FileFindEx Get More from File/Folder Searches (formerly _WinAPI_FileFind) Since it's always bugged me that the AutoIT implementation of 'FindFirstFile' and 'FindNextFile' only returned filenames and that extra calls had to be made to get file-size, attributes, short-names, and date/time of file creation,last-access, & last-modification which severely increased the amount of time it took to properly analyze the contents of a folder and it's files, I decided to create an alternative. This uses the same Windows calls as AutoIT, except it returns all the information that it rightfully should for each file found - including: File attributes (in numerical form, not a silly string format)Creation TimeLast-Access TimeLast-Write TimeFileSizeFilename (obviously)8.3 short name (if it is 1. different from the regular Filename and 2. if short-names haven't been turned offReparse Point info (if available)Now, the calling process is a little different, though for the most part not much is required to be altered in existing code. Basically, the attributes-check for folders is a numerical test, and when a folder is found, you *need* to test for '.' and '..' navigation (fake) folders. Also, the 'While' loop changes into a 'Do-Until' loop. Additionally, the first _FileFindExFirstFile() call returns a file, whereas FileFindFirstFile() doesn't (which never made sense to me). To convert times into a readable format, you'll need to pass the array to the _FileFindExTimeConvert() function. Optionally, you can get the _WinTimeFunctions UDF and call those functions using array index constants: $FFX_CREATION_TIME, $FFX_LAST_ACCESS_TIME, or $FFX_LAST_MODIFIED_TIME. Note all _FileFindEx* calls are done using a special array, though 'ByRef' for quicker performance. A nice application I found for this UDF was comparing files/folders - which is pretty easy using 64-bit filetime and file-size comparisons (no need for time conversion there). The ZIP includes 4 files: the _FileFindEx UDF, FileFindExTest, the license agreement (same as below), and _LinkedOutputDisplay. Please note that _LinkedOutputDisplay on its own is a mess - but its included as-is to help see a side-by-side comparison of the output from FileFindExTest. To get all the same information that _FileFindEx provides, the AutoIt functions below would need to be called: FileFindFirst/NextFileFileGetAttrib *** NOTE: This Fails to report on some attributes (Reparse Points, Sparse Files) ***FileGetTime *3 (one for each time - Creation, Last-Access, Last-Modified)FileGetSizeFileGetShortName (note: this provides a full path, rather than just a file name)Please note that for a fair time comparison, a clean boot is needed for each test due to O/S buffering after a scan. Between boots, the order of function calls in 'FileFindExTest' would need to be swapped. In first-run tests, _FileFindEx has consistently been quicker when gathering more than basic filename info. However, running the UDF in 64-bit mode on Vista+ O/S's results in slower performance, hence this note: *IMPORTANT* - Speed is severely affected on certain processors when the script is run in x64 mode. I therefore recommend running/compiling the code in both bit-modes beforehand to see what the speed difference is. On my machine I've found x86 is much faster, whereas x64 is much slower than AutoIt's search functions. Other's have so I'm guessing it must be how optimized the hardware architecture is at running x64 code. Update Log: Download the ZIP Here Ascend4nt's AutoIT Code License agreement: While I provide this source code freely, if you do use the code in your projects, all I ask is that: If you provide source, keep the header as I have put it, OR, if you expand it, then at least acknowledge me as the original author, and any other authors I creditIf the program is released, acknowledge me in your credits (it doesn't have to state which functions came from me, though again if the source is provided - see #1)The source on it's own (as opposed to part of a project) can not be posted unless a link to the page(s) where the code were retrieved from is provided and a message stating that the latest updates will be available on the page(s) linked to.Pieces of the code can however be discussed on the threads where Ascend4nt has posted the code without worrying about further linking.
×
×
  • Create New...