mr-es335 Posted August 14, 2023 Share Posted August 14, 2023 Good day, Is there anyway to replicate the .cmd script following in AutoIt? :: ----------------------------------------------- :: Create all directories and copy all data... xcopy %~dp0Source_Data_C C:\ /e /s /h /q /r /y xcopy %~dp0Source_Data_E E:\ /e /s /h /q /r /y xcopy %~dp0Source_Data_F F:\ /e /s /h /q /r /y xcopy %~dp0Source_Data_G G:\ /e /s /h /q /r /y :: ----------------------------------------------- Sub-folders of C:\, Program Files, ProgramData, RML, Users, Windows Sub-folders of E:\, Text Sub-folders of F:\, Backing_Tracks Sub-folders of G:\, AltPeakData, Automation_Data, CHT_Files, F-Key_Data, , Mix_Templates, Session_Master The Sub-folders also contain folders and data Thank yo for any assistance that may be provided! mr-es335 mr-es335 Sentinel Music Studios Link to comment Share on other sites More sharing options...
Andreik Posted August 14, 2023 Share Posted August 14, 2023 Take a look in help file at DirCopy() or your can execute your actual dos commands with _RunDos() or Run(). When the words fail... music speaks. Link to comment Share on other sites More sharing options...
rudi Posted August 17, 2023 Share Posted August 17, 2023 As @Andreik already mentioned, you can use your commands from inside AutoIT. I would like to mention to use $ExitCode=RunWait() to start robocopy.exe instead of xcopy.exe: The ExitCode of robocopy is giving you exact information, what was going on -- everything less than 8 is fine Robocopy Exit Codes from ss64.com the /mir switch offers to sync the content to the destination folder (orphaned files in destination are deleted) the option "/z" offers to copy in restartable mode, usefull for very large files to continue in case of network problems. Note: There is one version of robocopy (coming from robocopyGUI), that doesn't provide valid exit codes. Just avoid grabbing that one accidentally (about the times of WinVista, IIRC) Earth is flat, pigs can fly, and Nuclear Power is SAFE! Link to comment Share on other sites More sharing options...
Solution mr-es335 Posted September 1, 2023 Author Solution Share Posted September 1, 2023 Good day, Thanks for the follow-ups...appreciated... Though the suggestions noted have been considered and some attempted, I have since decided to not go this route. I will mark the posting as "resolved" - even though the posting is not really resolved. PS: The whole purpose in employing AutoIt! is to move out of DOS completely. mr-es335 Sentinel Music Studios Link to comment Share on other sites More sharing options...
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