Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/27/2024 in all areas

  1. TomMilter

    ePUB Reader

    As for me, it’s a pretty convenient project without any unnecessary problems. Respect to the author
    1 point
  2. Use /XD to exclude certain directories. And this $excludeFolders = ("@MyDocumentsDir\Ma musique") should be: $excludeFolders = @MyDocumentsDir & "\Ma musique" Also you overwrite $excludeFolders so after this: $excludeFolders = ("@MyDocumentsDir\Ma musique") $excludeFolders = ("@MyDocumentsDir\Mes images") $excludeFolders =("@MyDocumentsDir\Mes videos") $excludeFolders contains the last assignment. You have also some inconsistencies: DirCreate("D:\" & $date & '.\Mes Documents') $dest = ("D:\" &($date) & 'Documents') What exactly it is de destination here? #RequireAdmin $sDate = @MDAY & "-" & @MON $sToday = @YEAR & @MON & @MDAY & "_" & @HOUR & @MIN & @SEC $sSource = '"' & @UserProfileDir & '\Documents"' $sDestination = '"D:\' & $sDate & '\Documents"' If Not FileExists($sDestination) Then DirCreate($sDestination) Local $sExclude = ' /XD ' $sExclude &= ' "' & @MyDocumentsDir & '\My Music"' $sExclude &= ' "' & @MyDocumentsDir & '\My Pictures"' $sExclude &= ' "' & @MyDocumentsDir & '\My Videos"' RunWait(@ComSpec & " /c ROBOCOPY " & $sSource & " " & $sDestination & " /MIR /R:2 /TEE /XF desktop.ini" & $sExclude, @ScriptDir, @SW_MINIMIZE) If @error Then MsgBox(0x10, "Erreur", "Une erreur s'est produite lors de la sauvegarde.") Else MsgBox(0, "Succès", "La sauvegarde a été effectuée avec succès.") EndIf
    1 point
  3. Hello @teodoric666 When you post code, please use the method described in the link. You can now edit your post, go back to your post and use the ... in the upper right to do so. You should take the time to read forum rules. In there you will find all you should know of what it is allowed and what is not. Before embarking in coding, you should take a moment to plan your algorithmic approach. Once you start coding, you should be able to debug your code, there is a _Debug UDF, that can help you in your process of finding a solution. Now dropping a bunch of code to us to rewrite it so it will work for you, is definitely not the best way to learn how to program with AutoIt. Since you are new to AutoIt and you may not be familiar to all its intrinsic, I would recommend to use AutoIt functions (as far as possible) instead of relying on external programs. In your case, you may want to look at _FileListToArray or _FileListToArrayRec (which has a mask to exclude folders). Having a list of folders to copy into an array will help you to understand what is going on. Use _ArrayDisplay to read the content of an array. Finally look at DirCopy to perform the actual copy/backup of your folders.
    1 point
  4. Andreik

    ePUB Reader

    New version available. Fixed a bug in displaying error messages thanks to @mLipok.
    1 point
  5. teodoric666, I have now read your script more carefully and I am happy there is no problem, other than you unfortunate choice of word in the thread title! M23
    1 point
  6. ioa747

    A bug in Execute()

    ConsoleWrite(Execute((100^2) - (96^2)) & @CRLF) ;784 ConsoleWrite(Execute("(100^2) - (96^2)") & @CRLF) ;784 ConsoleWrite(Execute("100^2" - "96^2") & @CRLF) ;4 ConsoleWrite(Execute(100 * 100 - 96 * 96) & @CRLF) ;784 ConsoleWrite(Execute(100^2 -- 96^2) & @CRLF) ;784 ConsoleWrite(Execute(100^2 -+ 96^2) & @CRLF) ;784 ConsoleWrite(Execute(100^2 +- 96^2) & @CRLF) ;19216 everything works to me
    1 point
  7. Melba23

    A bug in Execute()

    Ozirys, Nine is quite correct - look in the Help file under <Operators - Precedence> and you will see this: Although the operator precedence should suffice in most cases, is recommended to use brackets to force the order of evaluation if the result is critical or if the expression is complex. e.g. (2 + 4) * 10 equals 60. This is particularly true for the - operator which can be used for both binary subtraction (subtraction of 2 numbers)and unary negation (setting the negative of a value). The use of brackets is highly recommended in this case to prevent confusion. M23
    1 point
×
×
  • Create New...