get absolute filename


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting get absolute filename
# 1  
Old 08-21-2007
get absolute filename

How would I get the absolute filename of a selected file...I want to control click...I already have the context menu all set to run a script...I just need to be able to get the file name of the file I control clicked on.

In windows it is as follows:
set filename=%~f1
set name=%~n1
set extention=%%~xa

Then to call it %filename% or %name% or %extention%.

Is there the same thing for a Mac shell script?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

to extract all the part of the filename before a particular word in the filename

Hi All, Thanks in Advance I am working on a shell script. I need some assistance. My code: if then set "subscriber" "promplan" "mapping" "dedicatedaccount" "faflistSub" "faflistAcc" "accumulator"\ "pam_account"; for i in 1 2 3 4 5 6 7 8;... (0 Replies)
Discussion started by: aealexanderraj
0 Replies

2. UNIX for Dummies Questions & Answers

to extract all the part of the filename before a particular word in the filename

Hi All, Thanks in Advance I am working on a shell script. I need some assistance. My Requirement: 1) There are some set of files in a directory like given below OTP_UFSC_20120530000000_acc.csv OTP_UFSC_20120530000000_faf.csv OTP_UFSC_20120530000000_prom.csv... (0 Replies)
Discussion started by: aealexanderraj
0 Replies

3. Shell Programming and Scripting

Split Filename from Absolute Path

Hello, I have the string "/a/b/c/ddd.txt" and i want to get only the filename, in this case "ddd.txt". I have as something known in the script the pattern "/a/b/c/", so I`ve tried something like: echo "/a/b/c/ddd.txt" | cut -d "/a/b/c/" -f2 but it doesn`t go, any help?. thanks, bye (2 Replies)
Discussion started by: rubber08
2 Replies

4. Shell Programming and Scripting

Filename from splitting files to have the same filename of the original file with counter value

Hi all, I have a list of xml file. I need to split the files to a different files when see the <ko> tag. The list of filename are B20090908.1100-20090908.1200_CDMA=1,NO=2,SITE=3.xml B20090908.1200-20090908.1300_CDMA=1,NO=2,SITE=3.xml B20090908.1300-20090908.1400_CDMA=1,NO=2,SITE=3.xml ... (3 Replies)
Discussion started by: natalie23
3 Replies

5. Windows & DOS: Issues & Discussions

get filename from absolute path in batch program

hey im writing batch program for the first time and i have almost finished it the only problem is that i want to extract basename from absolute path for eg : if my first argument is c:\abcd\xyz\temp.txt then i want only temp.txt in variable. and how do i extract some part from string for eg... (1 Reply)
Discussion started by: zedex
1 Replies

6. UNIX for Dummies Questions & Answers

absolute value

is there any function in unix which will convert a integer to absolute value with a single decimal point. suppose x=15232 y=x/1024=14.875 i want y to be 14.8 Similarly if y=6.29452 it should come as 6.3 (3 Replies)
Discussion started by: dr46014
3 Replies

7. Shell Programming and Scripting

gzcat into awk and then change FILENAME and process new FILENAME

I am trying to write a script that prompts users for date and time, then process the gzip file into awk. During the ksh part of the script another file is created and needs to be processed with a different set of pattern matches then I need to combine the two in the end. I'm stuck at the part... (6 Replies)
Discussion started by: timj123
6 Replies

8. Shell Programming and Scripting

Absolute value

Is there a function in awk to get the absolute value of a-b which can be negative or positive, I just care for the absolute value... (5 Replies)
Discussion started by: placroix1
5 Replies

9. UNIX for Dummies Questions & Answers

absolute path

is cd ~ considered an absolute path? (2 Replies)
Discussion started by: Kirichiko
2 Replies

10. UNIX for Dummies Questions & Answers

Getting absolute value ksh

Hi, I am trying to find out how to get an absolute value for integer in ksh. I tried using abs... but that doesn't work ! this is the workaround I did, but isn't there an inbuilt function to get absolute value for any variable ! Please help as i am new to unix :confused: Thanks, ... (3 Replies)
Discussion started by: icyhot
3 Replies
Login or Register to Ask a Question
dtinfoaction(file formats)												dtinfoaction(file formats)

NAME
dtinfoaction -- CDE information management actions SYNOPSIS
DtLoadInfoLib filename Open filename DtShowInfoAtLoc DtPrintInfoAtLoc DESCRIPTION
The CDE Information Management Services support the following information management actions: DtLoadInfoLib filename Load the information library specified by filename, which can be either a relative or absolute file path. If filename is not specified, dtinfo displays the default information library(s). Open filename Load the information library specified by filename. Remaps to DtLoadInfoLib filename. DtShowInfoAtLoc filename section Display the section or topic specified by section contained within the infolib specified by filename. filename can be either a relative or absolute file path. section specifies the information library section in generalized locator format. dtinfo is started if it is not already running. This corresponds to invoking dtinfo with the -sect option from the command line. DtPrintInfoAtLoc Print one or more infolib sections from the desktop. This action is invoked whenever a section or sections is dragged from the book list window in dtinfo and dropped on the printer icon on the front panel. These actions can be invoked from an application using the DtActionInvoke(3) function or invoked from a command line using the dtaction(1) utility. SEE ALSO
dtinfo(1), DtActionInvoke(3), DtInfo_LoadInfoLib(4), DtInfo_PrintInfoAtLoc(4), DtInfo_ShowInfoAtLoc 4 dtinfoaction(file formats)