Jump to content

Recommended Posts

Posted

How would I rename a file say

C:\Hello.mp3

to

C:\Hi.mp3

My site for HTML Help :)[quote name='Valik' date='Oct 15 2004, 12:29 PM']Maybe nobody is an "elite uber-coder" like me because thinking is a capital offense in today's online-world?[right][snapback]36427[/snapback][/right][/quote]
Posted

Hello,

Small question ...

Why not add alias with the FileMove function ?

Here the code that I added has File.au3...

; Renommer un fichier
; Auteur : Groumphy
; Alias de FileMove
Func _Rename($iPath, $iOldName, $iNewName)
; success : 1
; failure : 0
    FileMove($iPath & "\" & $iOldName, $iPath & "\" & $iNewName)
EndFunc; ==> _Rename("C:", "OldFichier.mp3", "NewFichier.mp3")

Now for rename a file, I make :

#include <file.au3>
_Rename("C:", "OldFichier.mp3", "NewFichier.mp3")

Wouldn't this be easier?

----------------------GroumphyMore information about me [Fr]

Posted (edited)
FileMove() works fine. What you are trying to do is just prolonging an existing function and adding un-necessary work, effort and coding. Edited by Burrup

qq

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...