strate Posted October 29, 2004 Posted October 29, 2004 Is it possible to rename a file? I have a .txt and I want to rename it as a .def how would I do this? INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station...
Matt @ MPCS Posted October 29, 2004 Posted October 29, 2004 If you want to use AutoIt use FileCopy. You have to be kinda creative with the functions we have, and think outside the box to apply them to what you need. *** Matt @ MPCS
strate Posted October 29, 2004 Author Posted October 29, 2004 rename *.txt *.def<{POST_SNAPBACK}>?? Is that a feature ?? INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station...
Matt @ MPCS Posted October 29, 2004 Posted October 29, 2004 No AutoIt does not have a "rename" function. To accomplish this in AutoIt do As I posted above. *** Matt @ MPCS
Matt @ MPCS Posted October 29, 2004 Posted October 29, 2004 CORRECTION: Sorry brainfart... you need to use FileMove so you dont have 2 files. Example: FileMove("C:\MyFile.txt", "C:\MyNewFile.def") That should work... it is untested but check the helpfile for more assistance. *** Matt @ MPCS
strate Posted October 29, 2004 Author Posted October 29, 2004 CORRECTION: Sorry brainfart... you need to use FileMove so you dont have 2 files. Example:FileMove("C:\MyFile.txt", "C:\MyNewFile.def")That should work... it is untested but check the helpfile for more assistance.*** Matt @ MPCS<{POST_SNAPBACK}>It seems weird that when you've read the help file forty thousand times the simple solutions don't come to mind. Well for me anyways. Sorry the FileCopy worked perfect. The extra file is fine I can keep a record of what the operater did.Thanks again. INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station...
Somerset Posted October 29, 2004 Posted October 29, 2004 yeah it works. what i suggested works in %comspec%
strate Posted October 29, 2004 Author Posted October 29, 2004 yeah it works. what i suggested works in %comspec%<{POST_SNAPBACK}>Please explain more about what you mean. INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station...
Developers Jos Posted October 29, 2004 Developers Posted October 29, 2004 (edited) Please explain more about what you mean.<{POST_SNAPBACK}>he means: run the Good Old dos command rename or ren.runwait(@comspec & " /c rename from.txt to.def') Edited October 29, 2004 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
JSThePatriot Posted October 29, 2004 Posted October 29, 2004 Also jumping from Matt's example you could use the following FileMove("C:\YourFile.txt", "C:\*.def") That way it keeps the same file name... JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)
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