aslani Posted August 23, 2008 Posted August 23, 2008 Ok sift thru the search already and nada. Basically, we get our work from a network directory and we move that folder into our desktop and start on working on the contents. I made a program that assists on the work load in the folder and it will be really helpful to add a function that automatically moves the folder into the desktop, but using either of the move function doesn't seems to work. Here's what I have. Case $msg = $k_mECO $g_kECO = GUICtrlRead($k_eco) If FileExists("N:\Temp\" & $g_kECO) Then DirMove("N:\Temp\" & $g_kECO, @DesktopDir) Else MsgBox(0, $g_kECO, $g_kECO & " not found!") EndIf If FileExists(@DesktopDir & "\" & $g_kECO) Then MsgBox(0, $g_kECO, $g_kECO & " move was a success!") Else MsgBox(0, $g_kECO, $g_kECO & " move failed!") EndIf $g_kECO is the folder name. Any help is appreciated. [font="Georgia"]Chances are, I'm wrong.[/font]HotKey trouble?Stringregexp GuideAutoIT Current Version
BrettF Posted August 23, 2008 Posted August 23, 2008 If its a network share, I take it is a networked computer? Try using the actual computer name instead. \\PCNAME\TEMP\.... Also, make sure there is no trailing backslash on the source, or destination. Cheers, Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
dbzfanatic Posted August 23, 2008 Posted August 23, 2008 Try FileCreateShortcut(). If the drive is mapped then that should work and even if it doesn't move it should have more or less the same effect. Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote]
aslani Posted August 23, 2008 Author Posted August 23, 2008 I tried both suggestions...still didn't work. I'm wondering because FileExists() works just fine with mapped directory, what makes moving the folder special? [font="Georgia"]Chances are, I'm wrong.[/font]HotKey trouble?Stringregexp GuideAutoIT Current Version
dbzfanatic Posted August 23, 2008 Posted August 23, 2008 Mapping a drive with autoit seems to be a problem for everyone. There are a lot of threads regarding this matter, maybe if you search you'll find a solution. Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote]
Anteaus Posted August 23, 2008 Posted August 23, 2008 (edited) dbzfanatic said: Mapping a drive with autoit seems to be a problem for everyone.News to me. Our logon-scripts rely on DriveMapAdd(), and that's numerous logons daily. Problems are rare. We do still use the 3.1 compiler mind you. Has the probem arisen with later compilers?The issue with UNC paths is that they create a 'nail-down' situation in which the network admin cannot/dare not reorganise data on the servers, for fear of breaking undocumented links to it. Basically they are another of those Bad Ideas which I suppose seemed good to the MS techs at the time. Drive mappings (especially when established by a logon script) are free from this problem, though they do suffer clashes with those USB multi-cardreaders which allocate a whole bank of letters for no good reason.To the OP: an issue to watch is that you cannot remap a letter under WinXP without first deleting it. Might this be your problem? Edited August 23, 2008 by Anteaus
Danny35d Posted August 23, 2008 Posted August 23, 2008 (edited) DirMove() RemarksIf the destination already exists and the overwrite flag is specified then the source directory will be moved inside the destination.@DesktopDir directory already exists so you need to add flag 1. After your script finish moving the folder over to the desktop press F5 to refresh the screen.DirMove("N:\Temp\" & $g_kECO, @DesktopDir , 1) Edited August 23, 2008 by Danny35d AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line
aslani Posted August 25, 2008 Author Posted August 25, 2008 (edited) Danny35d said: DirMove() Remarks If the destination already exists and the overwrite flag is specified then the source directory will be moved inside the destination. @DesktopDir directory already exists so you need to add flag 1. After your script finish moving the folder over to the desktop press F5 to refresh the screen. DirMove("N:\Temp\" & $g_kECO, @DesktopDir , 1) Oh wow, that work. I misunderstood the "if the destination already exist" thinking that if the folder I'm transfering is already in the destination that's why I didn't flag it. Thank you. EDIT: Ok, it worked but it dumps everything on the Desktop rather than inside the folder. Example: Folder_1 - File_1 - File_2 After DirMove(), it looks like this; Desktop - Folder_1 - File_1 - File_2 Instead of; Desktop - Folder_1 -- File_1 -- File_2 Any suggestion? EDIT 2: nvm I figured it out, it came to me as I was typing the first edit. DirMove("N:\Temp\" & $g_kECO, @DesktopDir & "\" & $g_kECO, 1) Thank you all for you help. Edited August 25, 2008 by aslani [font="Georgia"]Chances are, I'm wrong.[/font]HotKey trouble?Stringregexp GuideAutoIT Current Version
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