rename all text files in a folder Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
crypter
Posts: 90
Joined: 15 Dec 2020, 09:57

rename all text files in a folder

20 Jun 2021, 20:45

i have 1 million text files (.txt) that i have to replace extension to .ahk

i have

Code: Select all

FileMove, C:\Folder1\*.txt, D:\New Folder\*.ahk
and i need to add as a file name "Program" + number from 1 to 1 million replacing names and extension by alphabetical order (ascending) in the entire folder
User avatar
Smile_
Posts: 858
Joined: 03 May 2020, 00:51

Re: rename all text files in a folder  Topic is solved

21 Jun 2021, 00:47

Code: Select all

WD := A_ScriptDir
Loop, Files, % WD "\*.txt"
   FileMove, % WD "\" A_LoopFileName, % "Program" A_Index ".ahk", 0

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot], inseption86, jaka1, mebelantikjaya and 288 guests