Developers Jos Posted June 28, 2018 Developers Posted June 28, 2018 So have you tried compiling the script as Console App? Either way, lets go back on topic being the filemove issue. Are you 100% sure you have the rights to rename/move and the file isn't readonly or something? Jos 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.
Earthshine Posted June 28, 2018 Posted June 28, 2018 (edited) ran your code @Jos and got this >"C:\Program Files (x86)\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "D:\OneDrive - Company Name\test.au3" @@ Debug(20) : @WorkingDir & "\" & $file_array[$index] = D:\OneDrive - Company Name\test.exe_ >Error code: 0 @@ Debug(22) : $rc=1 @WorkingDir & "\" & $new_file_name = D:\OneDrive - Company Name\test.exe >Error code: 0 using this code #include <FileConstants.au3> #include <MsgBoxConstants.au3> #include <WinAPIFiles.au3> Example() Func Example() Local $file_array[1] = ["test.exe_"] For $index = 0 To (UBound($file_array) - 1) $new_file_name = StringTrimRight($file_array[$index], 1) ;~ ConsoleWrite("New File name: " & $new_file_name) ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : @WorkingDir & "\" & $file_array[$index] = ' & @WorkingDir & "\" & $file_array[$index] & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console $rc=FileMove(@WorkingDir & "\" & $file_array[$index], @WorkingDir & "\" & $new_file_name) ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $rc=' & $rc & ' @WorkingDir & "\" & $new_file_name = ' & @WorkingDir & "\" & $new_file_name & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console Next EndFunc it's working fine for me, not to say remote would work though Edited June 28, 2018 by Earthshine My resources are limited. You must ask the right questions
MFrancisca Posted June 28, 2018 Author Posted June 28, 2018 5 minutes ago, Jos said: So have you tried compiling the script as Console App? Either way, lets go back on topic being the filemove issue. Are you 100% sure you have the rights to rename/move and the file isn't readonly or something? Jos Yes, I'm sure
Earthshine Posted June 28, 2018 Posted June 28, 2018 so can you do it manually from the command line? My resources are limited. You must ask the right questions
MFrancisca Posted June 28, 2018 Author Posted June 28, 2018 1 minute ago, Earthshine said: so can you do it manually from the command line? Yes, I could do it no problem from the command line
Earthshine Posted June 28, 2018 Posted June 28, 2018 (edited) can you do it remotely from command line psexec?? Edited June 28, 2018 by Earthshine My resources are limited. You must ask the right questions
MFrancisca Posted June 28, 2018 Author Posted June 28, 2018 21 minutes ago, Earthshine said: can you do it remotely from command line? Yes I could do it... Also, the system is working with 3 remotes machines in parallel, but only 1 has the problem. The other 2 are renaming the files with no issues
Earthshine Posted June 28, 2018 Posted June 28, 2018 (edited) Well now we know it's a configuration issue and you should be able to compare those against the other two. Now we need to decide on a tool that collects all the data we need to compare Edited June 28, 2018 by Earthshine My resources are limited. You must ask the right questions
MFrancisca Posted June 28, 2018 Author Posted June 28, 2018 3 minutes ago, Earthshine said: Well now we know it's a configuration issue and you should be able to compare those against the other two. Now we need to decide on a tool that collects all the data we need to compare What kind of configuration could be causing this? Sorry, this is out of my depth for programming
Earthshine Posted June 28, 2018 Posted June 28, 2018 some kind of policy maybe I am thinking? there are tools you can use to collect everything else, compare drivers, installed software, etc.. My resources are limited. You must ask the right questions
MFrancisca Posted June 28, 2018 Author Posted June 28, 2018 The only thing that is really different between the machine with problems and the others is windows defender. It is active on the machine with problems and the others do not have it active. all 3 machines are actually clones of a 4th one that works as server
Earthshine Posted June 28, 2018 Posted June 28, 2018 maybe try turning it off or making an exception of that directory in Defender My resources are limited. You must ask the right questions
Developers Jos Posted June 28, 2018 Developers Posted June 28, 2018 Windows Defender has this new anti ransomware option which disallows programs to start renaming files, so that would be a good candidate for cause this type of behavior. Jos 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.
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