NSString *scriptPath = [[NSBundle mainBundle] pathForResource:@DeleteHidden
ofType:nil];
NSTask *task;
task = [[NSTask alloc] init];
[task setLaunchPath:scriptPath];
The script DeleteHidden had line endings of cf,lf which caused an exception
on 10.9
removing the cr via a hex editor resolved
On Nov 27, 2013, at 7:59 AM, koko k...@highrolls.net wrote:
NSString *scriptPath = [[NSBundle mainBundle] pathForResource:@DeleteHidden
ofType:nil];
NSTask *task;
task = [[NSTask alloc] init];
[task setLaunchPath:scriptPath];
The script DeleteHidden had line endings of cf,lf which
I need to remove hidden files from removable media and have been doing so
successfully until 10.9.
I use NSTask as follows:
NSTask *task;
task = [[NSTask alloc] init];
[task setLaunchPath:rootScriptPath];
[task setArguments:[NSArray arrayWithObjects:rootpath, nil]];
[task waitUntilExit
On Tue, Nov 26, 2013, at 07:47 AM, koko wrote:
This works just fine up to and including 10.8.5 BUT throws an exception
at [task launch] on 10.9
What is the exception?
--Kyle Sluder
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do
paths you need to useā¦
I hope that this helps.
On 26 Nov 2013, at 15:47, koko k...@highrolls.net wrote:
I need to remove hidden files from removable media and have been doing so
successfully until 10.9.
I use NSTask as follows:
NSTask *task;
task = [[NSTask alloc] init];
[task
On Nov 26, 2013, at 8:56 AM, Pax 45rpmli...@googlemail.com wrote:
hy would you delete files in this manner?
Need to wildcard the file names.
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator
On Nov 26, 2013, at 9:42 AM, koko k...@highrolls.net wrote:
On Nov 26, 2013, at 8:56 AM, Pax 45rpmli...@googlemail.com wrote:
hy would you delete files in this manner?
Need to wildcard the file names.
Get the directory contents and look for matches, or use glob.
--
Scott Ribe
So:
NSFileManager *fileMgr = [NSFileManager defaultManager];
NSArray *contents = [fileMgr contentsOfDirectoryAtPath:path
error:nil];
for (NSString *item in contents)
{
if ([item rangeOfString:wildcard].location !=NSNotFound)
{
On Tue, Nov 26, 2013, at 09:37 AM, koko wrote:
On Nov 26, 2013, at 10:26 AM, Kyle Sluder k...@ksluder.com wrote:
Error 2 is ENOENT. The path you passed to -setLaunchPath: does not exist.
Not possible as
[task setLaunchPath:rootScriptPath];
where rootScriptPath is NSString
On Nov 26, 2013, at 9:47 AM, koko wrote:
NSTask *task;
task = [[NSTask alloc] init];
[task setLaunchPath:rootScriptPath];
[task setArguments:[NSArray arrayWithObjects:rootpath, nil]];
[task waitUntilExit];
[task launch];
[task release];
You have the invocation of -launch and
10 matches
Mail list logo