Sign in to follow this  
Followers 0
Gillboss

rename

19 posts in this topic

there is command of rename file? thx

Share this post


Link to post
Share on other sites



There's not a FileRename() function, use FileMove() instead :D


Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

maybe this is what my sailor friend menting about

$source="C:\d4rk.txt"
$des="C:\d4rks0ul.txt"
FileMove($source,$des)
FileDelete($source)
Edited by d4rk

[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Share this post


Link to post
Share on other sites

maybe this is what my sailor friend menting about

$source="C:\d4rk.txt"
 $des="C:\d4rks0ul.txt"
 FileMove($source,$des)
 FileDelete($source)
Why use FileDelete() the file has been moved!

Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites

Why use FileDelete() the file has been moved!

if not, you'll have a d4rk.txt and a d4rks0ul.txt with a same content, and it won't look like a "rename" func

[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Share this post


Link to post
Share on other sites

ok i know it =]

and more quetion, how can i know if the file in pc?

for example the file "asd.exe"

Share this post


Link to post
Share on other sites

if not, you'll have a d4rk.txt and a d4rks0ul.txt with a same content, and it won't look like a "rename" func

Huh? the only reason the source file would still exist is because the source file is in use by another process when your calling the FileMove() function..

In any normal case FileMove does exactly that.. It moves the source to the destination ...

So therefore calling FileDelete($source) at the end of a FileMove() would be redundant.

Cheers

Share this post


Link to post
Share on other sites

yum ... :D i miss-identify Filemove() and Filecopy(), sory guys

the correct should be

$source="C:\d4rk.txt"
$des="C:\d4rks0ul.txt"
FileMove($source,$des)

[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Share this post


Link to post
Share on other sites

and more quetion, how can i know if the file in pc?

for example the file "asd.exe"

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

If FileExists("asd.exe") Then ...

Edited by monoceres

Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

and more quetion, how can i know if the file in pc?

for example the file "asd.exe"

edit : these long codes would cover the screen Edited by d4rk

[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Share this post


Link to post
Share on other sites

its ok?

If FileExists(@WindowsDir & "\" & "Dont Delete.exe") Then

MsgBox(0, "hello, there is no file")

EndIf

Share this post


Link to post
Share on other sites

its ok?

If FileExists(@WindowsDir & "\" & "Dont Delete.exe") Then

MsgBox(0, "hello, there is no file")

EndIf

No add Not before FileExists()

Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites

If FileExists(@WindowsDir & "\Dont Delete.exe") Then
MsgBox(0, "hello, it's right there !")
EndIf


[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Share this post


Link to post
Share on other sites

#15 ·  Posted (edited)

so this ok?

If FileExists("Dont Delete.exe") Then

MsgBox(0, "hello, there is file")

EndIf

Edited by Gillboss

Share this post


Link to post
Share on other sites

so this ok?

If FileExists("Dont Delete.exe") Then

MsgBox(0, "hello, there is file")

EndIf

Yes


Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites

what ? will FileExits() check all the drive for the Dont Delete.exe ?


[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Share this post


Link to post
Share on other sites

#19 ·  Posted (edited)

ok, if you can specific the place of file, so it's should be

If Not FileExists(@WindowsDir & "\Dont Delete.exe") Then
MsgBox(0, "NO FILE","The file isn't exist")
Else
Run(@WindowsDir & "\Dont Delete.exe")
EndIf
Edited by d4rk

[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

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