tes5884 Posted August 14, 2012 Posted August 14, 2012 The program is supposed to search for *.pst files, then copy the results to a server share. What am I doing wrong? It doesn't seem to be doing anything. $nMsg = GUIGetMsg() Switch $nmsg Case $bckuppst While 1 $pst1=FileFindFirstFile("*.pst") FileCopy($pst1, "\\majordc01\backups\" & @UserName, 8) $pst2=FileFindNextFile($pst1) FileCopy($pst2, "\\majordc01\backups\" & @UserName, 8) if @error then ExitLoop WEnd EndSwitch Thanks! www.tspitz.com
Moderators JLogan3o13 Posted August 14, 2012 Moderators Posted August 14, 2012 Are the .pst files all in one directory? If so, I would do something simple like this. $dir1 = @DesktopDir & "Test" $dir2 = @DesktopDir & "Test2" FileCopy($dir1 & "*.pst", $dir2) "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!
tes5884 Posted August 14, 2012 Author Posted August 14, 2012 Are the .pst files all in one directory? If so, I would do something simple like this. $dir1 = @DesktopDir & "Test" $dir2 = @DesktopDir & "Test2" FileCopy($dir1 & "*.pst", $dir2) No, I'm trying to search the computer, since some people tend to have pst files laying all over.. www.tspitz.com
Zedna Posted August 14, 2012 Posted August 14, 2012 (edited) You do it totally wrong. Just copy example from helpfile for FileFindFirstFile() ... Edited August 14, 2012 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search
tes5884 Posted August 14, 2012 Author Posted August 14, 2012 I did basically copy the help file. Except the help file doesn't give the example I need. Is there some way for me to search recursively, dig deeper into directories? Not just the script directory. Zedna, thanks for the answer. If you could tell me what I did wrong, would be appreciated. www.tspitz.com
tes5884 Posted August 14, 2012 Author Posted August 14, 2012 Ok, I think will help me. I'll post my results. www.tspitz.com
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