FordPrefect Posted January 28, 2009 Posted January 28, 2009 Hi, I just want to copy a file from a network share - username and pw are required. Using "DriveMapAdd" only brings up "/run /prod /ErrorStdOut" when running the script. DriveMapDel("L:") DriveMapAdd("L:", "\\share", 0, "domain\user", "password") FileCopy("L:\test.doc", "c:\test.doc") I used the search, but didn´t find a solution. Help please
Skruge Posted January 28, 2009 Posted January 28, 2009 If DriveMapAdd fails, @error will tell you why. Consult the help file for the different values. It's possible that L: is already mapped to something else. If all you're doing is copying a file, you don't need a drive letter assignment. DriveMapAdd("", "\\server\share", 0, "domain\user", "password") If @error Then MsgBox(0, "DriveMapAdd Error", @error) Else FileCopy("\\server\share\test.doc", "c:\test.doc") DriveMapDel("\\server\share") EndIf Also, I'm not exactly sure what you mean by this:Using "DriveMapAdd" only brings up "/run /prod /ErrorStdOut" when running the script.It sounds like you're running it from within SciTE, but you don't have any output to display. You can add some ConsoleWrite lines to track a script's progress. [font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font]
FordPrefect Posted January 29, 2009 Author Posted January 29, 2009 (edited) Thanks Skruge - you made my day. Your hints for "debugging" opened my eyes. Shame on me... Everything worked fine: I was browsing the destination folder´s files ordered by "last modified" and couldn´t find the (old) copied file by current date . Edited January 29, 2009 by FordPrefect
flyonthewall Posted January 29, 2009 Posted January 29, 2009 thank you Skruge. very nice. great help.
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