I need to find a file using Applescript. Applescript is so slow. Someone on the Apple forums gave me some unix code and it works for the most part. The ls command is really list and not find but when it works, it returns the path to the file instantly, NOT 45 seconds Applescript takes.
here is the path to the folder:
here is the name of the file:
AFRICA1 Faso, Burkina.doc
here is the shell script I am using that does not work:
text_returned is the result of a dialog box, in this example its AFRICA1
can anyone help me get this to work with either ls or a find command. Thank you very much.
I am an audio post engineer who searches a dozen servers for the file I need and write code to help me find the file instead of me clicking 50 times through a folder structure that is brutal. Thanks for any help.
Last edited by vbe; 09-14-2015 at 11:05 AM..
Reason: attempt to put code tags...
this is how we work. This is the file name:
AFRICA1 Faso, Burkina.doc
We just refer to the project or file as AFRICA1. The rest of the file name sometimes it too hard to remember or pronounce. So in Applescript I use a dialog box to have the user enter the project code (AFRICA1) and I use that info in searching for the file in the folder. I hope that all makes sense. Maybe if I replace "*Burkina" with the variable text_returned that will work.
I'll fix that but do I need to put do shell script in front of the find command and do I need to put quotes before find and after the last character of the command line. thanks
Hello guys,
I am a newbie to all of this - I'd like some help with a file I have. It's a ~100mb CSV file with approximately 30 columns.
What I'd like to do is to search through the file and REMOVE any lines with a certain case insensitive string in any of the columns:
So my file looks... (4 Replies)
Hi
I'm just messing around with bash and trying to learn it because I have a course next semester dealing with OS design where we need to know how to use SSH client and either bash or ksh. I've never done shell scripting before.
I just started today and I was wondering how parsing files... (1 Reply)
Hey all,
I'm brand new to script writing, I'm wanting to make a script that will ask for a file and then retrieve that file if it exists, and if it doesn't exist, create the file with the desired name, and I'm completely stuck.. so far..
#! bin/bash
echo "Enter desired file"
read "$file"
if ... (5 Replies)
Hi
I have a perl script that prints all the video and audio file information(playing duration).
It works fine in one of my friends linux laptop.
But it doesn't work in my both windows and linux.
My friend told me I have to do install some module ( ppm instal ...... )
but I have no... (1 Reply)
Hello everyone,
I am having to do a lot of perl scripting these days and I am learning a lot.
I have this problem
I want to move files from a folder and all its sub folders to one parent folder, they are all .gz files..
there is folder1\folder2\*.gz
and there are about 50 folders... (1 Reply)
Hello everyone,
Just started UNIX today! In our school we use solaris. I just want to know how do I setup Solaris 10 not the GUI one, the one where you have to type the commands like ECHO, ls, pwd, etc... I have windows xp and I also have vmware.
I hope I am not missing anything! :p (4 Replies)
Basically I have a shell script and i want to search the computer for a folder and if that folder exists i want to take some action. Not sure exactly how to do this most efficiently.
Not very experienced....any help would be appreciated. (1 Reply)
please help me figure out how to do this
I wont lie, this is for a homework problem and I have searched on google for a long time and still can't figure out what to do.
here is the problem
So there's a folder let's say called "bare"
in it, there are 10 dirs with names from "part1" through... (2 Replies)
Hi,
I am newbie in unix and just started learning it. I want to know what is the difference between an executable file and a file (say text file). How to create executable file? What is the extension for that? How to differentiate ? How does it get executed?
Thanks (1 Reply)