Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Windows Script Host
Message
 
To
30/11/2007 10:12:03
General information
Forum:
Windows
Category:
Other
Miscellaneous
Thread ID:
01272405
Message ID:
01272463
Views:
19
Juan,

Use the Move method.

[Update]
Grr. Pressed send without pasting the sample code.
local lcFile, lcNewName, loFSO, loFile

lcFile				= && Path + FileName
lcNewName			= && NewFile Name, no Path
loFSO				= Createobject('Scripting.FileSystemObject')
loFile				= loFSO.GetFile(lcFile)
loFile.Move(Addbs(Justpath(lcFile)) + lcNewName)
>Hi, how can i rename a file in WSH. I used REN and don't work. HELP.
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Previous
Reply
Map
View

Click here to load this message in the networking platform