sbrady Posted November 29, 2012 Share Posted November 29, 2012 I have a file on the desktop I want to move into a folder on the desktop. What am I doing wrong, code is right out of the help file. By the way , once the file is moved INTO the folder, is there a way to select it programmatically. The name of the file to be moved is copy of pw.txt FileMove ( "C:\Documents and Settings\sebrad\Desktop\" & "Copy of pw", "C:\Documents and Settings\sebrad\Desktop\Open PM3\" ) Link to comment Share on other sites More sharing options...
bogQ Posted November 29, 2012 Share Posted November 29, 2012 and where is your ".txt" in code? TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
sbrady Posted November 29, 2012 Author Share Posted November 29, 2012 this wont work either, maybe I need to reboot the machine to clear things out. $Source = "C:Documents and SettingssebradDesktopOpen PM3Copy of pw.txt" $Dest = "C:Documents and SettingssebradDesktopOpen PM3" FileMove( $Source, $Dest ) Link to comment Share on other sites More sharing options...
sbrady Posted November 29, 2012 Author Share Posted November 29, 2012 do you need to have the file extension in the code all the time. My machine does not show .txt in the desktop. I am coming from the Mac way of doing things. Link to comment Share on other sites More sharing options...
Developers Jos Posted November 29, 2012 Developers Share Posted November 29, 2012 Source and destination looks pretty much the same. 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. Link to comment Share on other sites More sharing options...
bogQ Posted November 29, 2012 Share Posted November 29, 2012 answer on second question#Include <WinAPIEx.au3> _WinAPI_ShellOpenFolderAndSelectItems('C:Documents and SettingssebradDesktopOpen PM3copy of pw.txt') TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
sbrady Posted November 29, 2012 Author Share Posted November 29, 2012 I get an error, says cant open file &^%$#@@ still cant figure out why a simply fileMove command wont work. answer on second question #Include <WinAPIEx.au3> _WinAPI_ShellOpenFolderAndSelectItems('C:Documents and SettingssebradDesktopOpen PM3copy of pw.txt') Link to comment Share on other sites More sharing options...
sbrady Posted November 29, 2012 Author Share Posted November 29, 2012 I got the FileMove to work if going from folder to folder. desktop to folder does NOT work why cant I move it from the DESKTOP to a folder........hmmmmmm $Source = "C:Documents and SettingssebradDesktopshawncopy of pw.txt" $Dest = "C:Documents and SettingssebradDesktopOpen PM3" FileMove( $Source, $Dest ) Link to comment Share on other sites More sharing options...
sbrady Posted November 29, 2012 Author Share Posted November 29, 2012 bog, I downloaded your WINAPIEx file, now what...... Link to comment Share on other sites More sharing options...
JohnOne Posted November 29, 2012 Share Posted November 29, 2012 Desktop is a folder. Cant take anything you say at it's value anyway because you have proven that you just make it up as you go along. It is my opinion that you have more super secret code you are not mentioning. FileMove works Perfectly every time, when used properly. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted November 29, 2012 Moderators Share Posted November 29, 2012 I got the FileMove to work if going from folder to folder. desktop to folder does NOT work why cant I move it from the DESKTOP to a folder........hmmmmmm $Source = "C:Documents and SettingssebradDesktopshawncopy of pw.txt" $Dest = "C:Documents and SettingssebradDesktopOpen PM3" FileMove( $Source, $Dest ) This is never going to work the way you want, because you're not defining the name of the file in the destination. The code as you have it will create an unknown filetype called OpenPM3 on the desktop. This, however, works all day: $Source = "C:Documents and SettingssebradDesktopshawncopy of pw.txt" $Dest = "C:Documents and SettingssebradDesktopOpen PM3copy of pw.txt" FileMove( $Source, $Dest ) "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! 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