MI74 Posted August 7, 2006 Posted August 7, 2006 If someone would be so kind or at least take pity on me.. My problem is that I have a folder of files that need to have .txt added to their name. Could someone help me get started or at least point me in the right direction? Thank you for your patience and guidance, or should I say tolerance on behalf of all newbies.
Xenobiologist Posted August 7, 2006 Posted August 7, 2006 Hi, read the files into an array and then use FileMove to rename them. So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times
/dev/null Posted August 7, 2006 Posted August 7, 2006 read the files into an array and then use FileMove to rename them._FileListToArray() ...CheersKurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *
Xenobiologist Posted August 7, 2006 Posted August 7, 2006 HI, here is somethi gto start with #Include <File.au3> #Include <Array.au3> Global $directory = FileSelectFolder("Chose files: ", "", 4, "c:") & "\" Global $FileList = _FileListToArray($directory, '*.txt') Global $add = ".hugo" If (Not IsArray($FileList)) and (@error = 1) Then MsgBox(0, "", "No Files\Folders Found.") Exit EndIf _ArrayDisplay($FileList,"") For $i=1 To UBound($FileList)-1 If FileMove($directory & $FileList[$i], $directory & $FileList[$i] & $add ,1) = 0 Then ConsoleWrite("Error" & $i & " " & $FileList[$i]) Next So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times
makogen Posted January 6, 2008 Posted January 6, 2008 is there a way to load the file list into an Array without alphabetizing them?
rasim Posted January 6, 2008 Posted January 6, 2008 is there a way to load the file list into an Array without alphabetizing them?#include <Array.au3> #include <File.au3> $FileArray = _FileListToArray("c:\test", "*.*", 1) _ArraySort($FileArray, 1, 1) ; or _ArrayReverse($FileArray, 1) _ArrayDisplay($FileArray)
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now