flyonthewall Posted August 31, 2007 Share Posted August 31, 2007 Trying to move a file from a server to "All Users" folder, and replace existing. Runs but does not move the file. Source, destination, and flag OK? Thank for any assistance. FileMove("\\server\folder1\folder2\testmovefile*", "C:\Documents and Settings\All Users\Application Data\folder1\folder2\testmovefile*", 1) Link to comment Share on other sites More sharing options...
PsaltyDS Posted August 31, 2007 Share Posted August 31, 2007 (edited) Trying to move a file from a server to "All Users" folder, and replace existing. Runs but does not move the file. Source, destination, and flag OK? Thank for any assistance. FileMove("\\server\folder1\folder2\testmovefile*", "C:\Documents and Settings\All Users\Application Data\folder1\folder2\testmovefile*", 1) If you are going to use wildcards in the source, only give the folder for the destination with the trailing backslash: FileMove("\\server\folder1\folder2\testmovefile*", "C:\Documents and Settings\All Users\Application Data\folder1\folder2\", 1+8) The help file for FileMove() plainly says you can use wildcards in the destination, but I'm not sure how that would work or what the resolution logic would be. Edit: Added +8 to the parms for create directories as requiered, per lod3n. Still don't get the wildcard in the destination though... Edited August 31, 2007 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
lod3n Posted August 31, 2007 Share Posted August 31, 2007 FileMove("\\server\folder1\folder2\testmovefile*", "C:\Documents and Settings\All Users\Application Data\folder1\folder2\testmovefile*", 1+8) [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font] Link to comment Share on other sites More sharing options...
flyonthewall Posted August 31, 2007 Author Share Posted August 31, 2007 Thanks for the replies I should have been using FileCopy in the first place. The code below works great btw. (overwriting same file name w/new data on the exisiting directory) FileCopy("\\server\folder1\folder2\testmovefile*", "C:\Documents and Settings\All Users\Application Data\folder1\folder2\", 9) Have a great weekend. 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