idle Posted December 19, 2003 Share Posted December 19, 2003 Maybe wrong place but am I the only one missing a move and overwrite function? I tried the copy function, but that doen not overwrite either? Link to comment Share on other sites More sharing options...
scriptkitty Posted December 19, 2003 Share Posted December 19, 2003 (edited) From help FileCopy ( "source", "dest" [,flag]) (optional) this flag determines whether to overwrite files if they already exist: 0 = (default) do not overwrite existing files 1 = overwrite existing filesIf you want it to overwrite, use the flag, as such: FileCopy ( "c:\test.txt", "c:\test2.txt",1 ) The file move doesn't have that part. FileMove ( "source", "dest" ) You can do a test of exist first, or simply make your own move: FileCopy ( "c:\test.txt", "c:\test2.txt",1 ) FileDelete ( "c:\test.txt" ) or FileDelete ( "c:\test2.txt" ) Filemove ( "c:\test.txt", "c:\test2.txt") I use access to create Excell files, and it has the bad feature of keeping info and not just making a clean file each time when you export, so I have a little delete script for it. It is also useful to use the overwrite function on programs that change defaults on you. I have my own defaults, and I use a little loader au3 file to place that one in each time before it runs. Edited December 19, 2003 by scriptkitty AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
spock Posted April 1, 2010 Share Posted April 1, 2010 Autoits move is different to windows with respect to a program file that is being run. I run a program named netx.exe Once it is executed you would think you could do anything with the executable file, But NOOOO In windows I can not delete that particular exe file from the spot where it was run. I can do what I like to other copies of that program anywhere else on the disk. In windows explorer I can cut and past it to another folder, no complaint. I can rename it to anything I like, but I cannot delete it. In DOS I can move it anywhere else on the disk I like. >move c:\"Documents and Settings\All Users\Start Menu\Programs\Startup"\netx.exe c:\temp\" I can do this via the LAN BUT I cannot do this with AUTOIT's FILEMOVE() I suspect that autoit copies the file from the original and then tries to delete the original becaude a copy does appear in the target folder but the original is still in the source folder, because windows will not allow deletion. AND windows just alters the directory entry for the file, saying it is somewhere else, hence avoiding the problem of deleting a locked file. So the autoit move command half worked but gave an error message. So its not a windows compatible FILEMOVE Link to comment Share on other sites More sharing options...
GEOSoft Posted April 1, 2010 Share Posted April 1, 2010 Well I'll be damned! Talk about someone re-appearing from the distant past. Good to see you are still among the living. BTW: Would it hurt you to drop by a bit more often? George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
Valuater Posted April 1, 2010 Share Posted April 1, 2010 Well I'll be damned! Talk about someone re-appearing from the distant past. Good to see you are still among the living. BTW: Would it hurt you to drop by a bit more often?Just a newbie posting on an Old... Old thread Posted 19 December 2003 - 01:50 PM8) Link to comment Share on other sites More sharing options...
GEOSoft Posted April 1, 2010 Share Posted April 1, 2010 (edited) I'm just having a Mark Martin day. Just when everything seems to be going good........ EDIT: It looks like he was last active May of last year and I don't see any posts after Nov. 2005 which I would say is probably correct. Just blew my mind seeing someone from that far back and I didn't check the date. Where have all the old-timers gone? Cyberslug, Scriptkitty, Tylo, SvenP, and on and on and on. Edited April 1, 2010 by GEOSoft George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
jchd Posted April 1, 2010 Share Posted April 1, 2010 @spock,Of course resurrecting a six-year old thread is an achievement that makes you stand out of the crowd!Now, to your point, you say in substance:I can rename and delete a running program under DOSI can rename but not delete nor move a running program with Explorer under WindowsI can rename but not delete nor move a running program with AutoIt under WindowsTherefore, AutoIt FileMove is not Windows-compatible.Can you please care to reconsider so that we can put this thread back in it's grave? This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
spock Posted April 17, 2010 Share Posted April 17, 2010 Too many things at once I guess: KISS 1. I can move a running program in DOS. 2. I can cut and past the same running program in windows explorer. 3. I can NOT filemove the same running program in autoit. Which one of these things is not like the other? Link to comment Share on other sites More sharing options...
spock Posted April 17, 2010 Share Posted April 17, 2010 Too many things at once I guess: KISS1. I can move a running program in DOS.2. I can cut and past the same running program in windows explorer.3. I can NOT filemove the same running program in autoit.Which one of these things is not like the other?Here is a test programtestmove.au3 Link to comment Share on other sites More sharing options...
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