Jump to content

Search the Community

Showing results for tags 'old files'.

  • 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 2 results

  1. Hi guys, I see many script for delete files older then x in this forum, i found this and i think is very useful: #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 _FilesOlder(@ScriptDir, "*.*", 7, 1) ; Look for wildcards in the Help file. ; _FilesOlder("DIRECTORY", "FILTER [Default *.*]", "NUMBER OF DAYS [Default 0]", "RECURSIVE SEARCH [Default 1 - Yes]") Func _FilesOlder($sFilePath, $sFilter = "*.*", $iDate = 0, $iRecursive = 1) Local $aFilter, $sCommand = "del /q @path", $sDate = "", $sRecursive = "" $sFilePath = StringRegExpReplace($sFilePath, "[/]+z", "") & "" If $iDate > 0 Then $sDate = "/d -" & $iDate EndIf If $iRecursive Then $sRecursive = "/S" EndIf $aFilter = StringSplit($sFilter, ';') For $A = 1 To $aFilter[0] RunWait(@ComSpec & ' /c ' & 'forfiles /P ' & $sFilePath & ' ' & $sRecursive & ' /M ' & $aFilter[$A] & ' ' & $sDate & ' /C ' & ' "cmd /c ' & $sCommand & '"', $sFilePath, @SW_HIDE) Next EndFunc ;==>_FilesOlder But for me not work, don't delete any files. What is the problem? Thanks
  2. Right now i have several batch file backups running of just raw user data. basically running: xcopy {current location} {target locatiion} /d /c /e /h /r /q /y i see that autoIT has a DirCopy command, but im wondering if it has an option like xcopy to skip that file and continue on if it has a problem (/c) the batch files work nicely, but im trying to get rid of old files from the backup location. Ran into this problem several times ex: "i deleted that file. its not supposed to exist for legal reasons". kind of not what im looking for. So basically im wondering if we can get some kind of loop going to copy over every file while ignoring errors and overwrite without prompting, then go through and delete files that are not age appropriate. i understand comparing to _NowCalcDate, but the problem is with entering subfolders and scanning them as well. not looking for the script to be written for me as there are other things (error reports and the like) but just somewhere to start
×
×
  • Create New...