Discussion:
[power-pro] file.move(_file_,?"D:\01XXXX\") not working
Suresh sureshnawras@yahoo.co.uk [power-pro]
2017-12-23 08:55:24 UTC
Permalink
*Hi,
*
**file.move(_file_,?"D:\01XXXX\")
*
File move is not working at all but file copy is working perfectly.

My laptop Windows 10 64 bit, 4gb Ram, Powerpro 5.3.37. Somebody please help
*
*
*Regards,
Trish
brucexs@yahoo.com [power-pro]
2017-12-23 10:46:11 UTC
Permalink
Also, use files names and not short cuts in tests.

Also try file.copy followed by file.delete as work around in tests and original folder.
sureshnawras@yahoo.co.uk [power-pro]
2017-12-23 14:26:50 UTC
Permalink
Powerpro version 5.3.37.
Tried with files only not with shortcuts, but not moving.the selected file in Windows Explorer. any settings to change inside "context" (Command list - Setup)?
Tried :-
file.copy(_file_,?"D:\01XXXX\")
file.delete(_file_,?"D:\01XXXX\")
Error message "need one argument for file.delete"
brucexs@yahoo.com [power-pro]
2017-12-23 16:23:55 UTC
Permalink
Yes, the error message is right. See the help for file.
brucexs@yahoo.com [power-pro]
2017-12-23 16:37:17 UTC
Permalink
Make sure you have .37r2 as I recall there was an issue with file.move in a earlier version.
sureshnawras@yahoo.co.uk [power-pro]
2017-12-23 17:39:59 UTC
Permalink
pwrpro5.3_37h1_setup.exe only I could find. Where can I find the 5.3_37r2?
brucexs@yahoo.com [power-pro]
2017-12-23 19:13:54 UTC
Permalink
Sorry, my mistake. r2/h2 is current internal working version for me only. Install h1.

I'm off now and I won't be monitoring Yahoo until first week of New Year.
sureshnawras@yahoo.co.uk [power-pro]
2017-12-24 08:09:08 UTC
Permalink
Installed 37h1 version but still the same problem not moving the file. I am going to try other instructed options. Thank you for your help and kind efforts. Merry Christmas and a very Happy new year.
brucexs@yahoo.com [power-pro]
2017-12-29 09:52:37 UTC
Permalink
I had a chance to look at this and did find an error in the unicode version of file.dll. I have uploaded a fix to the powerpro installation files area of yahoo files as file.dll version 1.66. Let me know if this helps with your situation.

Note that this error affected unicode version of file only (5.3.37 series). Users of non-unicode version (5.3.35 series) should not update but rather should use version of file.dll included with .35 install.
brucexs@yahoo.com [power-pro]
2017-12-23 19:12:27 UTC
Permalink
Just to confirm, please try file.move (path1, path2)
where path1 is path to some file under My Documents and path2 is a folder under My Documents (different from the folder for the file at path1, of course).
Try with h1 once you have it.


If it succeeds, then it is likely some kind of permissions or other config issue with the context menu and _file_ case you wan to do.


If it fails, try the file.copy then file.delete workaround with above paths (file.delete just takes path1) and if that works, then same explanation.


If that fails, then I'll investigate further in New Year.
Suresh sureshnawras@yahoo.co.uk [power-pro]
2017-12-31 05:16:08 UTC
Permalink
Now working perfectly. Thanks
Suresh sureshnawras@yahoo.co.uk [power-pro]
2017-12-31 09:46:17 UTC
Permalink
How to get a prompt on "File Copy" successfully? If failed should get a
"Copy failed" prompt.

(Not required in the place of "File Move" as I can see immediately the
file removed from the current directory.)
brucexs@yahoo.com [power-pro]
2017-12-31 11:33:20 UTC
Permalink
I don't think you can get this from the command only. Possibly checking the return value and displaying a message accordingly.. If not, then check directly for the file with file.exists (or whatever the service is).

Both require a short script. To avoid creating many short script files for situations like this, I use exec morcommandasscript and put the script in the more commands field.
Suresh sureshnawras@yahoo.co.uk [power-pro]
2017-12-31 16:42:15 UTC
Permalink
Could you please provide your "morcommandasscript"?
Suresh sureshnawras@yahoo.co.uk [power-pro]
2018-01-01 04:20:41 UTC
Permalink
Dear Bruce, As mentioned in your reply, could you please provide your
"morcommandasscript", I wish to use that script.
brucexs@yahoo.com [power-pro]
2018-01-01 10:17:57 UTC
Permalink
Sorry, I don't actually have any such script. What exactly are you trying to do after you run the file. command
brucexs@yahoo.com [power-pro]
2018-01-01 10:31:37 UTC
Permalink
If it is to tjust product a message if the file is not on the target drive then the following pseudo code is what I had in mind. I am assuming you know how to script; you'll have to debug and check the following:

Command Entry Controls:
Exec
MoreCommandsAsScript


Following in more commands


local targetfolder = ?"D:\01XXXX\"
local targetpath= targetfolder ++ file.nametype(_file_)
file.move(_file_, target)
if (not file.validpath(targetpath))
messagebox("ok topmost". "file.move failed\m"++targetpath, "Error on move")
brucexs@yahoo.com [power-pro]
2018-01-01 11:11:37 UTC
Permalink
should be the following to have newline before targetpath
messagebox("ok topmost". "file.move failed\n"++targetpath, "Error on move")
Loading...