Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Relative links in XP 
Author Message
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 6:36 pm
Posts: 5150
Location: /dev/tty0
Reply with quote
Hi all,

I have a mapped network drive at work and I want to create a relative link to files.
Basically, each folder must have a ReadMe.txt file in it, and instead of just having them scattered around, we want to have a repository of them (named using the special naming convention) and then link to them.

If the repo is here:
\\server\stuff\myuid\share\admin\repo
And the file:
\\server\stuff\myuid\share\admin\repo\312-flipflop-U.txt

I want to be able to link this file back to it:
\\server\stuff\myuid\share\support\0301\organisation\flipflops\ReadMe.txt

So basically (as I understand)
..\..\..\..\..\admin\repo\312-flipflop-U.txt

Any way I can do this? I know I've not used mapped drives in my examples, and the whole set up is retarded, but any help would be wonderful.

Thanks very much guys,
Ben


Tue Jul 28, 2009 3:04 pm
Profile WWW
Spends far too much time on here
User avatar

Joined: Thu Apr 23, 2009 11:36 pm
Posts: 3527
Location: Portsmouth
Reply with quote
I don't quite understand.

So, you have a number of text files which need to be replicated in every user's home directory??

I think you could probably do it with a GPO. Not entirely sure how though, and I can't play right now.

Have you looked into using a GPO to do it?

_________________
Image


Tue Jul 28, 2009 5:23 pm
Profile
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 6:36 pm
Posts: 5150
Location: /dev/tty0
Reply with quote
No, it's not users home directories, it's a shared drive which everybody can access, but the path to the shared drive has the users username in it...It's really weird, I'm guessing it would make sense to someone...

Essentially, I have a file and I want to make a relative link to it, it's on the same storage area, but everybody access the area through a different path and this would be too complicated and probably impossible to change. (Don't as me, I can't do anything, stupid administrators locking down the system to cripple it)

What is GPO? Is it part of Windows? If it's not it won't work for us (we'll have to pay some company something like £25,000 to make sure it works, and it'll take 18 months...). If it is pat of Windows, will a locked down user be able to use it? Or would an admin need to do something?
Thanks for your reply Nick :)


Tue Jul 28, 2009 5:35 pm
Profile WWW
Spends far too much time on here
User avatar

Joined: Thu Apr 23, 2009 11:36 pm
Posts: 3527
Location: Portsmouth
Reply with quote
GPO is a group policy object. A locked down user certainly won't be able to create one.

The only thing I can think of is shortcuts, but I don't think they will do exactly what you want??

_________________
Image


Tue Jul 28, 2009 6:49 pm
Profile
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 6:36 pm
Posts: 5150
Location: /dev/tty0
Reply with quote
Nick wrote:
GPO is a group policy object. A locked down user certainly won't be able to create one.

The only thing I can think of is shortcuts, but I don't think they will do exactly what you want??


I shortcut is exactly what I want...But it must be relative, not absolute...

If I was using UNIX, I want to link to the file like the file 'bar', by default Windows does what 'foo' is doing.

Code:
Faegilath:foobar benlavery$ pwd
/Users/benlavery/Desktop/foobar
Faegilath:foobar benlavery$ ls -l
total 16
lrwxr-xr-x  1 benlavery  staff   7 28 Jul 19:53 bar -> ../link_me_please
lrwxr-xr-x  1 benlavery  staff  29 28 Jul 19:53 foo -> /Users/benlavery/Desktop/link_me_please


Tue Jul 28, 2009 6:57 pm
Profile WWW
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 6:58 pm
Posts: 8767
Location: behind the sofa
Reply with quote
[quote="forquare1"]I shortcut is exactly what I want...But it must be relative, not absolute.../quote]
A relative path in a readme.bat file should work?

Alternatively, is there an environmental variable you could use? If not, could you define one in the login script?

Failing that, the obvious thing would be to put the common file into a public share that doesn't mutate. Then you'd use a normal shortcut.

_________________
jonbwfc's law: "In any forum thread someone will, no matter what the subject, mention Firefly."

When you're feeling too silly for x404, youRwired.net


Tue Jul 28, 2009 7:15 pm
Profile WWW
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 6:36 pm
Posts: 5150
Location: /dev/tty0
Reply with quote
JJW009 wrote:
forquare1 wrote:
I shortcut is exactly what I want...But it must be relative, not absolute...

A relative path in a readme.bat file should work?

Alternatively, is there an environmental variable you could use? If not, could you define one in the login script?

Failing that, the obvious thing would be to put the common file into a public share that doesn't mutate. Then you'd use a normal shortcut.


Thanks JJ,

bat files won't execute on out system, and there isn't anywhere that won't mutate the path :(
I've got no idea about suitable environmental variables...How can I set them if there aren't any? How can I find what the current variables are?


Tue Jul 28, 2009 7:27 pm
Profile WWW
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 6:58 pm
Posts: 8767
Location: behind the sofa
Reply with quote
There is a variable %USERNAME% which you may be able to use in the path. Create a new shortcut and point it at:

\\server\stuff\%USERNAME%\share\admin\repo\312-flipflop-U.txt

You can also set temporary variables thus:

set common=\\server\whatever\

then you can use a path like:

%common%\wibble\wobble\

Except it only seems to work within the shell; not within Windows. I think maybe you need to use setx instead, but I'm unsure.

_________________
jonbwfc's law: "In any forum thread someone will, no matter what the subject, mention Firefly."

When you're feeling too silly for x404, youRwired.net


Tue Jul 28, 2009 7:45 pm
Profile WWW
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 6:36 pm
Posts: 5150
Location: /dev/tty0
Reply with quote
Excellent, thanks JJ, I'll look at that tomorrow :) I'll have to see, I did notice that some users access the area through a different server, so I'll have to see about that.
Thanks for your help :)


Tue Jul 28, 2009 7:53 pm
Profile WWW
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 6:36 pm
Posts: 5150
Location: /dev/tty0
Reply with quote
IT Support wrote:
Good Afternoon,
Unfortunately Windows does not support relative file paths within shortcuts. The usual work around for this is to create a shortcut to the command prompt executable cmd.exe with a switch to start a program or open a file, i.e. cmd.exe /start ..\foo\bar.exe

Unfortunately as access to the command prompt on your system is blocked this work around will not work.

We have now closed this case.


There we go, the help desk being helpful...

It does surprise me that such a basic operation doesn’t exist, and a relatively complex method is employed to only half achieve it.

Thanks for everyone’s help. He are going to have to duplicate files in order to distribute them as we need and to keep them in a central location like we want…






Stupid system.


Wed Jul 29, 2009 12:19 pm
Profile WWW
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 6:58 pm
Posts: 8767
Location: behind the sofa
Reply with quote
In that case, why not make a readme that reads "Please see the updated readme located in the folder ...."

Alternatively, can you open HTML files? If so, then you could create an explanatory page with a relative link.

Did you try the %username% variable? You can definitely use it in shortcuts, but it only helps if the username is exactly what appears in the path.

_________________
jonbwfc's law: "In any forum thread someone will, no matter what the subject, mention Firefly."

When you're feeling too silly for x404, youRwired.net


Wed Jul 29, 2009 4:17 pm
Profile WWW
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 6:36 pm
Posts: 5150
Location: /dev/tty0
Reply with quote
JJW009 wrote:
In that case, why not make a readme that reads "Please see the updated readme located in the folder ...."

Alternatively, can you open HTML files? If so, then you could create an explanatory page with a relative link.


The problem is, the area is used by the whole department, the area must follow a specific structure and adher to a number of rules. One of the rules is to have a document in every folder with meta-data in it, it's these files that we (as a department) would like to keep centrally so they are easy to find, and link out to so if the meta changes centrally, it will be up to date in the folder too. So far there are about two and a half thousand documents, that's possibly about a sixth of the total we'll have...

JJW009 wrote:
Did you try the %username% variable? You can definitely use it in shortcuts, but it only helps if the username is exactly what appears in the path.


I did, and for most people it worked, but some people access the area through a different server, so it broke for them :(


Wed Jul 29, 2009 4:51 pm
Profile WWW
Spends far too much time on here
User avatar

Joined: Thu Apr 23, 2009 11:36 pm
Posts: 3527
Location: Portsmouth
Reply with quote
forquare1 wrote:
I did, and for most people it worked, but some people access the area through a different server, so it broke for them :(


What about using a different variable then?

Rather than \\server\stuff\%username%\share\admin\repo\312-flipflop-U.txt perhaps you could use something like \\%homepath%\share\lalala ???? Or are these files not in the home directory? I suppose they must not be if they are on loads of different servers. I don't think I still fully understand lol

_________________
Image


Wed Jul 29, 2009 6:11 pm
Profile
Occasionally has a life

Joined: Tue May 12, 2009 1:47 am
Posts: 114
Reply with quote
maybe you could use some synchronization program to synchronize the folders to a central store folder. so If one file gets updated the program also updates the central store folder. Vice Versa is a Good one for that.
Not detailed I know but just a suggestion.

_________________
Sometimes a little thick mostly completely thick


Thu Jul 30, 2009 2:23 am
Profile
Spends far too much time on here
User avatar

Joined: Thu Apr 23, 2009 11:36 pm
Posts: 3527
Location: Portsmouth
Reply with quote
Nick wrote:
forquare1 wrote:
I did, and for most people it worked, but some people access the area through a different server, so it broke for them :(


What about using a different variable then?

Rather than \\server\stuff\%username%\share\admin\repo\312-flipflop-U.txt perhaps you could use something like \\%homepath%\share\lalala ???? Or are these files not in the home directory? I suppose they must not be if they are on loads of different servers. I don't think I still fully understand lol


Okay, scratch that!

Just read this thread again and noticed that earlier in the thread you said they aren't home areas. Still, there might be a variable out there. *shrug*

_________________
Image


Thu Jul 30, 2009 8:44 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 16 posts ]  Go to page 1, 2  Next

Who is online

Users browsing this forum: No registered users and 17 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.