New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Operating System General OS operation information and support

How to link to files in other folders


Post Reply New Thread Subscribe

 
Thread Tools
gatorbrit

 
Member Since: May 06, 2011
Posts: 3
gatorbrit is on a distinguished road

gatorbrit is offline
I am running a statistical program that is running in the following sub dir:

Code:
MacintoshHD/Users/Myname/Dropbox/Stuff/Subfolder
And I want to reference a file located in another folder.

Code:
MacintoshHD/Users/Myname/Dropbox/OtherStuff/OtherSubfolder
When I program:
Code:
read "/Dropbox/OtherStuff/OtherSubfolder
I get file not found.

In Linux this would have worked (I think). In windows I would say
Code:
read "d:/Dropbox/ blah blah blah"
Do I need to put in the full path with the MacintoshHD part as well?

Many thanks

Rich
QUOTE Thanks
Raz0rEdge

 
Raz0rEdge's Avatar
 
Member Since: Jul 17, 2009
Location: MA
Posts: 7,436
Raz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant future
Mac Specs: 27" i7 iMac, 24" iMac, 13" Macbook Air, iPhone 5 & 5S, iPod Nano 7th Gen, iPad 2 16GB WiFi, iPad 3

Raz0rEdge is offline
Is "read" a program you've installed or are you trying to read/view the file? If so, you want to use "cat" or "more" or "less" to do that..

So your command would be something like:
Code:
cat ~/DropBox/OtherStuff/OtherSubFolder/OtherFile
You say you want to link folders, but are reading..could you explain a little more on what you are trying to do?

Regards
QUOTE Thanks
gatorbrit

 
Member Since: May 06, 2011
Posts: 3
gatorbrit is on a distinguished road

gatorbrit is offline
Actually I just wanted to put in the path in a program to another file.

After messing around the following seems to work:

Code:
/Users/myname/Dropbox/folder/subfolder/anothersub/file

I switched to OS X from ubuntu linux and in linux I would not have had to put in the "Users/myname" part in the path.

As I am on the only user on my Mac, this seems redundant.
QUOTE Thanks
Raz0rEdge

 
Raz0rEdge's Avatar
 
Member Since: Jul 17, 2009
Location: MA
Posts: 7,436
Raz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant future
Mac Specs: 27" i7 iMac, 24" iMac, 13" Macbook Air, iPhone 5 & 5S, iPod Nano 7th Gen, iPad 2 16GB WiFi, iPad 3

Raz0rEdge is offline
Just as in Linux, you can prefix your path's with "~" to get your home directory. Even on Linux, your home directory as a user was still in /home/<username>/, that's no different here in OS X..

So if anything coming from Linux means that a lot more of the OS X's FreedBSD roots should make a lot more sense..

Regards
QUOTE Thanks
gatorbrit

 
Member Since: May 06, 2011
Posts: 3
gatorbrit is on a distinguished road

gatorbrit is offline
Quote:
Originally Posted by Raz0rEdge View Post
Just as in Linux, you can prefix your path's with "~" to get your home directory. Even on Linux, your home directory as a user was still in /home/<username>/, that's no different here in OS X..

So if anything coming from Linux means that a lot more of the OS X's FreedBSD roots should make a lot more sense..

Regards

Oh duuhh!! I'm an idiot - I completely forgot that! Thanks! That'll make it easier!
QUOTE Thanks

Post Reply New Thread Subscribe


« OSX hard drive switch - G5 PPC | Need Help to restore deleted Partition for iMac »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Missing Folders and Files!! wes1977 OS X - Operating System 4 04-05-2010 06:46 AM
All files, folders, apps NOT in alphabetical order csc OS X - Operating System 3 05-08-2008 05:26 PM
Newbie question: Can you list folders before files? acmultimedia Switcher Hangout 3 02-01-2007 05:25 PM
Viewing number of files in multiple folders Womble Switcher Hangout 1 01-13-2007 02:35 AM

All times are GMT -4. The time now is 12:45 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?