david1337 Posted November 22, 2015 Share Posted November 22, 2015 (edited) Hi guysI'm a little stuck here, and could use some help.All I want to do is copy all content from FolderA to FolderB, but I can only make it work if I define the entire path. This works:#include <Process.au3> _RunDOS("xcopy C:\Users\USERNAME\AppData\Roaming\Microsoft\FolderA C:\Users\USERNAME\AppData\Roaming\Microsoft\FolderB /E /I") But this doesn't: #include <Process.au3> ;Makes sure that you can use _RunDos statements $FolderA = @AppDataDir & "\Microsoft\FolderA\" $FolderB = @AppDataDir & "\Microsoft\FolderB\" _RunDOS("xcopy $FolderA $FolderB /E /I") Any ideas? David Edited November 22, 2015 by david1337 Link to comment Share on other sites More sharing options...
Bowmore Posted November 22, 2015 Share Posted November 22, 2015 This is the way to do it.#include <Process.au3> ;Makes sure that you can use _RunDos statements $FolderA = @AppDataDir & "\Microsoft\FolderA\" $FolderB = @AppDataDir & "\Microsoft\FolderB\" _RunDOS("xcopy " & $FolderA & " " & $FolderB & " /E /I") david1337 1 "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook Link to comment Share on other sites More sharing options...
david1337 Posted November 22, 2015 Author Share Posted November 22, 2015 Hi BowmoreThanks for your reply!That doesn't work for me No error messages, it just doesn't copy anything? Link to comment Share on other sites More sharing options...
iamtheky Posted November 22, 2015 Share Posted November 22, 2015 in the 'working example' they dont have a trailing backslash. try it with run("cmd /k xcopy " .....) and see if we can get an output? david1337 1 ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
Bowmore Posted November 22, 2015 Share Posted November 22, 2015 Remove the trailing backslashes from the 2 paths like you had in your first attempt. "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook Link to comment Share on other sites More sharing options...
david1337 Posted November 22, 2015 Author Share Posted November 22, 2015 boththose,thanks! Removing the trailing backslashes worked @ Bowmore: Your example worked perfect when I removed the backslashes.Thanks to both of you!#include <Process.au3> ;Makes sure that you can use _RunDos statements $FolderA = @AppDataDir & "\Microsoft\FolderA" $FolderB = @AppDataDir & "\Microsoft\FolderB" _RunDOS("xcopy " & $FolderA & " " & $FolderB & " /E /I") 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