cjamit Posted August 28, 2008 Share Posted August 28, 2008 Hi,i've done mucho simple scripts like this before, but after updating to the newest version, when trying to run this one line script i get a /errorstdout error, with no furhter explanation..searching previous posts have come up with nothing like my problem.tiaRun ( 'xcopy /s /c /d /e /i /r /k /y "C:\Documents and Settings\%username%" "\\server\backup\%username%" ' ) Link to comment Share on other sites More sharing options...
Andreik Posted August 28, 2008 Share Posted August 28, 2008 Hi, i've done mucho simple scripts like this before, but after updating to the newest version, when trying to run this one line script i get a /errorstdout error, with no furhter explanation.. searching previous posts have come up with nothing like my problem. tia Run ( 'xcopy /s /c /d /e /i /r /k /y "C:\Documents and Settings\%username%" "\\server\backup\%username%" ' ) You can use @UserName Run ('xcopy /s /c /d /e /i /r /k /y "C:\Documents and Settings\"' & @UserName & ' "\\server\backup\"' & @UserName) When the words fail... music speaks. Link to comment Share on other sites More sharing options...
rasim Posted August 28, 2008 Share Posted August 28, 2008 cjamitTry this:Run(@ComSpec & ' /c xcopy /s /c /d /e /i /r /k /y "C:\Documents and Settings\%username%" "\\server\backup\%username%"', @SystemDir, @SW_HIDE) Link to comment Share on other sites More sharing options...
rasim Posted August 28, 2008 Share Posted August 28, 2008 cjamit Damn! Help ExpandEnvStrings Changes how literal strings and % symbols are interpreted. By default strings are treated literally, this option allows you to use %environment% variables inside strings, e.g., "The temp directory is: %temp%". 1 = expand environment variables (similar to AutoIt v2) 0 = do not expand environment variables (default) Without this option the usual way would be: "The temp directory is: " & EnvGet("temp") Example: Opt("ExpandEnvStrings", 1) MsgBox(0, "Temp", "%temp%") Link to comment Share on other sites More sharing options...
cjamit Posted August 28, 2008 Author Share Posted August 28, 2008 cjamit Damn! Example: Opt("ExpandEnvStrings", 1) MsgBox(0, "Temp", "%temp%") ############### Thanks, this seemed to do the trick, with the Opt("ExpandEnvStrings", 1) command 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