Sign in to follow this  
Followers 0
palba

Rename a Directory

6 posts in this topic

Hi All,

I'm trying to find a way to modify a Directory name.

I'm using FileMove but doesn't work.

Is there another command to use?

Thanks

Paul

Share this post


Link to post
Share on other sites



It is in the Help, Use DirMove

Because AutoIt lacks a "DirRename" function, use DirMove to rename a folder!

Hi All,

I'm trying to find a way to modify a Directory name.

I'm using FileMove but doesn't work.

Is there another command to use?

Thanks

Paul

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Why not doesn't work?

It works for me :mellow:

$OldName = "old folder name"
$NewName = "Some New folder name"

DirCreate(@DesktopDir & "\" & $OldName)
MsgBox(0,"Ok", "New folder is created with name: "&$OldName&", and it will be renamed to: "&$NewName)
DirMove(@DesktopDir & "\"& $OldName, @DesktopDir & "\"& $NewName)
Edited by n3nE

[quote name='dbzfanatic' post='609696' date='Nov 26 2008, 08:46 AM']This is a help forum not a "write this for me" forum.[/quote](Sorry for bad English) :)

Share this post


Link to post
Share on other sites

OP was using FileMove

Why not doesn't work?

It works for me :mellow:

$OldName = "old folder name"
$NewName = "Some New folder name"

DirCreate(@DesktopDir & "\" & $OldName)
MsgBox(0,"Ok", "New folder is created with name: "&$OldName&", and it will be renamed to: "&$NewName)
DirMove(@DesktopDir & "\"& $OldName, @DesktopDir & "\"& $NewName)

Share this post


Link to post
Share on other sites

Thank Guys!

You are genius!

The right command was DirMove!

Great!

Thanks ! Thanks !

All the best

Paul

Share this post


Link to post
Share on other sites

Hehe, you're Welcome :mellow:


[quote name='dbzfanatic' post='609696' date='Nov 26 2008, 08:46 AM']This is a help forum not a "write this for me" forum.[/quote](Sorry for bad English) :)

Share this post


Link to post
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
Sign in to follow this  
Followers 0