08-04-2017
Search and open a folder and file
here is the path on Macintosh:
Macintosh HD/Users/shawn/Desktop/ATP/ATP14 bon bon/ATP14 bon bon.jpg
- I need to find the folder with ATP14 in the name, then open the folder
- I need to find the file whose name starts with ATP14 in the folder in 1 above
I had been using this in Applescript but its not working now. Would
grep command work?
thanks for any help
set text_returned to "ATP14"
set the_producer_initials to "ATP"
do shell script
ls -d '/volumes/Macintosh HD/Users/shawn/Desktop/ATP/'*' ' & the_producer_initials's quoted form & "/" & text_returned's quoted form & "' '*"
Last edited by rbatte1; 08-07-2017 at 08:35 AM..
Reason: Converted textual numbered lists to formatted numbered lists with LIST=1 tags. Added ICODE tags
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Oracle procedure create files on UNIX folder on a regular basis. I need to FTP files onto windows server and place the files, based on their name, in the corresponding folders. File name is as follows: ccyymmddfoldernamefile.txt; Folder Name length could be of any size; however, the prefix and... (3 Replies)
Discussion started by: MeganP
3 Replies
2. Shell Programming and Scripting
Hello All,
Can you please help me with this request.
I have to identify a file (having file name with perticular pattern)
with in a range.
Example:
input file name can be:
myfile2007_03
myfile2007_45
myfile2007_198
myfile2007_25
myfile2007_101
my program has to identify... (1 Reply)
Discussion started by: sbasetty
1 Replies
3. Shell Programming and Scripting
This is the file structure:
DESKTOP/Root of Photo Folders/Folder1qweqwasdfsd/*jpg
DESKTOP/Root of Photo Folders/Folder2asdasdasd/*jpg
DESKTOP/Root of Photo Folders/Folder3asdadfhgasdf/*jpg
DESKTOP/Root of Photo Folders/Folder4qwetwdfsdfg/*jpg
DESKTOP/Root of Photo... (4 Replies)
Discussion started by: guptaxpn
4 Replies
4. Red Hat
I am using GUI mode in Linux & face a problem that when ever i double click on any folder it opens in new Window. I want to ask all DP members where is the option to disable this thing..
Means i want when ever i double on folder it should open in the same Window. looking for your help.. (1 Reply)
Discussion started by: salman103
1 Replies
5. Shell Programming and Scripting
Hello guys
I am sure that you will help me on this issue as you did earlier::)
Scenario :
I have a folder named "XYZ". It consist many sub-folders and subfolder contain severals files. there may be abc.dat in each subfolder. Now i want to seperate subfolders on follwing conditions-
if abc.dat... (12 Replies)
Discussion started by: infiant
12 Replies
6. Shell Programming and Scripting
hi ..
i have a problem how to search file with date and version number(ms_2.0_dd/mm/yy_24)in folder.Here 24 is version number and compare the this file to other file which is in another folder and if does not match then copy this file to respective folder.Also copy different files in different... (1 Reply)
Discussion started by: shubhig15
1 Replies
7. Shell Programming and Scripting
How can this be done?
I mean, I want to search for all *png *jpg *bmp files in my ~/Pictures/ folder....How can I list them?
Thank you geeks :) :b: (2 Replies)
Discussion started by: hakermania
2 Replies
8. Shell Programming and Scripting
Have to read one file say sourcefile containing several words and having another folder containing several files.
Now read the first word of Sourcefile & search it into the folder consisting sevral files, and create another file with result. We hhave to pick the filename of the file in which... (3 Replies)
Discussion started by: mukesh.baranwal
3 Replies
9. Shell Programming and Scripting
this works, it opens a project folder within a category folder:
set y to (do shell script "open '/volumes/Features1/" & the_cat & "/" & UpperCase & " '*")
this will not simply open the category folder:
set y to (do shell script "open '/volumes/Features1/" & the_cat & "/")
any ideas, I am... (0 Replies)
Discussion started by: sbrady
0 Replies
10. Ubuntu
My Ubuntu 16.04 OS has a neat feature. If I search for a specific file when it finds the file I can right-click it and select 'Open in folder'. However, I recently installed 12.04 (yes I know its EOL) and I noticed it doesn't seem to have this feature. Does anyone know if it is possible for me to... (3 Replies)
Discussion started by: Circuits
3 Replies
rmf(1) General Commands Manual rmf(1)
NAME
rmf - remove folder (only available within the message handling system, mh)
SYNOPSIS
rmf [+folder] [-help] [-[no]interactive]
OPTIONS
Prints a list of the valid options to this command. Asks for confirmation before deleting a folder. By default, rmf deletes a folder and
its messages without asking for confirmation. If you specify the -interactive option, rmf asks if you are sure before deleting the folder.
You are advised to use this option, since when rmf deletes a folder its contents are lost irretrievably.
DESCRIPTION
The rmf command removes all of the messages within the current folder, and then removes the folder itself. If there are any files within
the folder which are not part of MH, they are not removed, and an error message is displayed.
You can specify a folder other than the current folder by using the +folder argument. If you do not specify a folder, and rmf cannot find
the current folder,rmf asks you whether you want to delete +inbox instead.
If the current folder is removed, it makes +inbox current.
Note that the rmf command irreversibly deletes messages that do not have other links, so use it with caution.
If the folder being removed is a sub-folder, the parent folder becomes the new current folder, and rmf tells you that this has happened.
This provides an easy mechanism for selecting a set of messages, operating on the list, then removing the list and returning to the current
folder from which the list was extracted.
Using rmf to delete a read-only folder deletes the private sequence and current message information from the file, without affecting the
folder itself. If you have sub-folders within a folder, you must delete all the sub-folders before you can delete the folder itself.
PROFILE COMPONENTS
Path: To determine the user's Mail directory
EXAMPLES
This example shows how rmf asks for confirmation when the -interactive option is used: % rmf -interactive +test Remove folder "test"? y
FILES
The user profile.
SEE ALSO
rmm(1)
rmf(1)