I dont see a command for MOVING dos files and I dont think I can use the old format of 'SUSPEND EXIT MOVE' in OI.
If there is a MOVE procedure for dosfiles in OI please let me know.
So I am instead doing it in 2 parts
CopyOsFile
OsDelete
Problem - the target file is a mapped (shared) drive on another computer, for some reason the CopyOsFile is failing.
I checked the command using MOVE at dos prompt and it works so I have rights to the shared directory.
Does anyone know why this would not be working properly.
CopyOsFile - does not support wildcard characters - you must supply the target filename.
Now does anyone know anything about a moveing function.
Or does it still need to be done in 2 parts.
Isnt there something somewhere(forum) that tells you how to do it like shellexecute open cmd 'move x to y'
fount it.
rtrn=Utility("RUNWIN","cmd /c XCOPY C:\JUNK\*.* D:\JUNK\*.* /S/V/E")
Use OLE and the scripting.FileSystemObject
fsO=OLEcreateInstance( 'Scripting.FileSystemObject')
result=OleCallMethod(fsO,'MoveFile',fromfile, tofile)
http://msdn.microsoft.com/en-us/library/z9ty6h50%28VS.85%29.aspx
Bookmarking that one, I had thought I had seen something like that here. Cool
Be aware that if the target file exists it will not be overwritten.
Wild cards may be used to specify the source files or "\\" as the folder/directory.
Since this works at the OS level then if the target is on the same drive the files are not physically moved - just the directory tables are updated. File time/date stamps are also left intact which is not the case with CopyOSFile which I suspect does an OSREAD/OSWRITE. This is based on the observation of the amount of disk activity and that the time/date stamps are modified. Files can be renamed at the time of moving them by specifying a different name as the target.
Using RUNWIN/Shellexecute fails more often than not due to the size limitation of CMD buffer or the need for quotes due to spaces in folder/file names.