Progh0st Posted June 3, 2016 Posted June 3, 2016 This peace of code does not work. I'm trying to copy all my usb files to desktop. What is wrong with it? DirCopy("E:", @DesktopDir & "\Backups\MyWork", $FC_OVERWRITE) ;Tried also this, not working. DirCopy("E:\", @DesktopDir & "\Backups\MyWork\", $FC_OVERWRITE)
Moderators JLogan3o13 Posted June 3, 2016 Moderators Posted June 3, 2016 (edited) @Progh0st the code below just worked fine for me #include <FileConstants.au3> DirCopy("E:\", @DesktopDir & "\FromUSB\", $FC_OVERWRITE) Copied an .iso and a sub directory from the USB drive Edited June 3, 2016 by JLogan3o13 Progh0st 1 "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!
EmilyLove Posted June 3, 2016 Posted June 3, 2016 Looks fine to me. Make sure you are including FileConstants.au3 or overwrite flag won't work. If you don't want to bloat your script with the include, then just use 1 as the flag instead of $fc_overwrite. Progh0st 1
Moderators JLogan3o13 Posted June 3, 2016 Moderators Posted June 3, 2016 I would not call the 2k difference between doing it correctly and using magic numbers "bloat", personally. Progh0st 1 "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!
Progh0st Posted June 3, 2016 Author Posted June 3, 2016 16 minutes ago, JLogan3o13 said: @Progh0st the code below just worked fine for me #include <FileConstants.au3> DirCopy("E:\", @DesktopDir & "\FromUSB\", $FC_OVERWRITE) Copied an .iso and a sub directory from the USB drive Finally got it to work! Thanks to all of you. EmilyLove 1
EmilyLove Posted June 5, 2016 Posted June 5, 2016 Wonderful. Glad it is working for you now. Please change the title to solved when you have the chance.
guinness Posted June 5, 2016 Posted June 5, 2016 On 03/06/2016 at 4:13 PM, JLogan3o13 said: I would not call the 2k difference between doing it correctly and using magic numbers "bloat", personally. Here here! On 03/06/2016 at 4:03 PM, BetaLeaf said: Looks fine to me. Make sure you are including FileConstants.au3 or overwrite flag won't work. If you don't want to bloat your script with the include, then just use 1 as the flag instead of $fc_overwrite. Don't teach bad habits, as you are not teaching at all. JLogan3o13 1 UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018
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