EndFunc Posted April 11, 2007 Share Posted April 11, 2007 I've been stuck for a while and can't seem to get this to work. The parameters look ok but wont do what I need. $Scan = Run(@ComSpec & ' /c xcopy /C /D /S /H /I /R /K /Y C:\*' & $SearchFile[$c] & " " & $SFDestination, @WindowsDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) The Variables are just the file types and the destination path. Anything I might just be overlooking? EndFuncAutoIt is the shiznit. I love it. Link to comment Share on other sites More sharing options...
BillLuvsU Posted April 11, 2007 Share Posted April 11, 2007 Not sure but i think that first /c is killing you. Try taking it out or taking out the space in front of it. [center][/center]Working on the next big thing.Currently Playing: Halo 4, League of LegendsXBL GT: iRememberYhslaw Link to comment Share on other sites More sharing options...
EndFunc Posted April 11, 2007 Author Share Posted April 11, 2007 Not sure but i think that first /c is killing you. Try taking it out or taking out the space in front of it. That should work. Even if you put it in quotes by itself I get the same result which is nothing. And you have to have the space in front since it's a switch. $Scan = Run(@ComSpec & " /c " & 'xcopy /C /D /S /H /I /R /K /Y C:\*' & $SearchFile[$c] & " " & $SFDestination, @WindowsDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) This doesn't work either. EndFuncAutoIt is the shiznit. I love it. Link to comment Share on other sites More sharing options...
BillLuvsU Posted April 11, 2007 Share Posted April 11, 2007 if it's a switch shouldn't it be behind the function? [center][/center]Working on the next big thing.Currently Playing: Halo 4, League of LegendsXBL GT: iRememberYhslaw Link to comment Share on other sites More sharing options...
EndFunc Posted April 11, 2007 Author Share Posted April 11, 2007 if it's a switch shouldn't it be behind the function?Check out @ComSpec and Function Run EndFuncAutoIt is the shiznit. I love it. Link to comment Share on other sites More sharing options...
Developers Jos Posted April 11, 2007 Developers Share Posted April 11, 2007 (edited) I've been stuck for a while and can't seem to get this to work. The parameters look ok but wont do what I need. $Scan = Run(@ComSpec & ' /c xcopy /C /D /S /H /I /R /K /Y C:\*' & $SearchFile[$c] & " " & $SFDestination, @WindowsDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)oÝ÷ Ù8^Uªâi¹^±ªÞë-¶Wʬjwmç^²Ø§jب ò¶§¢cºË[zÞ®Z()àþ«¨µå¡jج¶Å§-ríz{hMúIæ«rbí7éƧwMúHP޲اjب ò²zȧ¶W§jg¬!û(¶¼ºÚ"µÍÌÍÔØØ[H[ÛÛTÜXÈ [È ÌÎNÈØÈÛÜHÐÈÑÔÈÒÒHÔÒÈÖH ][ÝÐÎÌLÊÌÎNÈ [È ÌÍÔÙXÚ[VÉÌÍØ×H [È ÌÎNÉ][ÝÈ ][ÝÉÌÎNÈ [È ÌÍÔÑÝ[][Û [È ÌÎNÉ][ÝÉÌÎNËÚ[ÝÜÑÕ×ÒQK ÌÍÔÕTÐÒS È ÌÍÔÕÕUÐÒS Edited April 11, 2007 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
EndFunc Posted April 11, 2007 Author Share Posted April 11, 2007 (edited) What is the exact content of $SearchFile[$c] and $SFDestination? Any spaces in the filenames? If so try: $Scan = Run(@ComSpec & ' /c xcopy /C /D /S /H /I /R /K /Y "C:\*' & $SearchFile[$c] & '" "' & $SFDestination & '"', @WindowsDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) $SearchFile[$c] is an array that are file types. .doc, .xls, etc I have this in a For/Next Loop. $SFDestination is the path that is being read from an INI file which does have spaces in it. But I tried to put quotes around the path in the ini file and it didn't seem to help. Sorry for not providing enough information. Edited April 11, 2007 by EndFunc EndFuncAutoIt is the shiznit. I love it. Link to comment Share on other sites More sharing options...
EndFunc Posted April 11, 2007 Author Share Posted April 11, 2007 What is the exact content of $SearchFile[$c] and $SFDestination? Any spaces in the filenames? If so try: $Scan = Run(@ComSpec & ' /c xcopy /C /D /S /H /I /R /K /Y "C:\*' & $SearchFile[$c] & '" "' & $SFDestination & '"', @WindowsDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) Yes, that was it. Thank you. I know it was something simple. I tried to put the quotes in the string in the ini file but it didn't like and ignored it for some reason. thanks EndFuncAutoIt is the shiznit. I love it. 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