Jump to content

renaming files


Recommended Posts

  • Moderators

Dim $counter = 0

Do

Filemove ( "*.txt", $counter & '.txt')

$counter = $counter + 1

Until $counter = 344

You could run into some serious issues with what you have there, better think through your logic a tad.
#include <file.au3>
$aArray = _FileListToArray(@ScriptDir, '*.txt')
For $iCC = 1 To UBound($aArray) - 1
    FileMove(@ScriptDir & '\' & $aArray[$iCC], @ScriptDir & '\' & $iCC & '.txt')
Next

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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...