[Newbies] OSProcess on Squeak 5.2/64 simple command failure: "del test.txt.

John-Reed Maffeo jrmaffeo at gmail.com
Wed Jun 27 02:06:17 UTC 2018


Well here I am replying to my own post. I don't have a solution to the
problem I reported, but I did find an alternative solution.

I used method finder to find methods with the #String 'delete' in them. The
class  #OSProcess contains a method #deleteFileNamed:  which was just what
I needed. Provide a fully qualified file name as the argument and it gets
deleted. e.g. "OSProcess deleteFileNamed: 'C:\MediaVault\BBC\test.txt'"

I developed and tested this on 5.2-64 on Windows. 7

-jrm



On Tue, Jun 26, 2018 at 3:38 PM John-Reed Maffeo <jrmaffeo at gmail.com> wrote:

> This seems strange, when I run the command:
> ExternalWindowsOSProcess command: 'del "C:\MediaVault\BBC\test.txt"'
>
> I get an error, with or without double quotes around the file name.
>
> It is strange because I use it three times in my method. The first two
> invocations launch external programs with long command strings. They work
> fine, but when I want to clean up, the process fails. The test case above,
> executed from Workspace, fails consistently.
>
> It fails  in 5.2/64 and 5.2.32
>
> I have not tried it in older versions
>
> -------
> Image
> -----
>
> C:\Smalltalk\Squeak5.2alpha-18110-64bit-201804030952-Windows\Squeak5.2alpha-18110-64bit\Squeak5.2alpha-18110-64bit.1.image
> Squeak5.2alpha
> latest update: #18110
> Current Change Set: BBCRR-RestartAt5.2alpha
> Image format 68021 (64 bit)
> -----
>
> -jrm
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/beginners/attachments/20180626/4bb3a977/attachment.html>


More information about the Beginners mailing list