How can I create a path+file name list of selected files?

Hi,

I want to select files and create a list (copy & paste) in a text editor?

Please see the screen shot (attachement)!

I want to have a result like:

- Action: "copy file name as text": =>

Phunkkmob_Something's Gotta Give_(WaWa)[Unknown].wav
Paco Buggin & Joy Marquez_Madrid
(Vocal)[Digi].mp3
Paul Woolford_Erotic Discourse
(Axwell)[Unknown].wav
Outwork vs. Kurd Maverick_Electro Rub
(Club)[Unknown].wav
Noir feat. Birago_Feel Alive
(Paul Thomas GK Electric)[Compulsive].mp3
Noir pres. Soul Flava_Hot
(Dub Deluxe)[Delecto].wav
Noir feat. Birago_Feel Alive
(Feel The Drum)[Compulsive].mp3
Noir feat. Birago_Feel Alive
(Original)[Compulsive].mp3
Ricky L feat. M CK_Born Again
(Pastaboys Main)_[Data].mp3

- Action: "copy path+file name as text" =>

M:\Tracks\Year_2006\Week_38\Phunkkmob_Something's Gotta Give_(WaWa)[Unknown].wav
M:\Tracks\Year_2006\Week_38\Paco Buggin & Joy Marquez_Madrid
(Vocal)[Digi].mp3
M:\Tracks\Year_2006\Week_38\Paul Woolford_Erotic Discourse
(Axwell)[Unknown].wav
M:\Tracks\Year_2006\Week_38\Outwork vs. Kurd Maverick_Electro Rub
(Club)[Unknown].wav
M:\Tracks\Year_2006\Week_38\Noir feat. Birago_Feel Alive
(Paul Thomas GK Electric)[Compulsive].mp3
M:\Tracks\Year_2006\Week_38\Noir pres. Soul Flava_Hot
(Dub Deluxe)[Delecto].wav
M:\Tracks\Year_2006\Week_38\Noir feat. Birago_Feel Alive
(Feel The Drum)[Compulsive].mp3
M:\Tracks\Year_2006\Week_38\Noir feat. Birago_Feel Alive
(Original)[Compulsive].mp3
M:\Tracks\Year_2006\Week_38\Ricky L feat. M CK_Born Again
(Pastaboys Main)_[Data].mp3

- Action: "copy path names as text" =>

M:\Tracks\Year_2006\Week_38

Also as URI type:

- Action: "copy path names as URI" =>
[file://M:/Tracks/Year_2006/Week_38](file://M:/Tracks/Year_2006/Week_38)

- Action: "copy path+file name as URI" =>
[file://M:/Tracks/Year_2006/Week_38/Phun ... omething's](file://M:/Tracks/Year_2006/Week_38/Phunkkmob_Something's) Gotta Give_(WaWa)[Unknown].wav
[file://M:/Tracks/Year_2006/Week_38/Paco](file://M:/Tracks/Year_2006/Week_38/Paco) Buggin & Joy Marquez_Madrid
(Vocal)[Digi].mp3
[file://M:/Tracks/Year_2006/Week_38/Paul](file://M:/Tracks/Year_2006/Week_38/Paul) Woolford_Erotic Discourse
(Axwell)[Unknown].wav
[file://M:/Tracks/Year_2006/Week_38/Outwork](file://M:/Tracks/Year_2006/Week_38/Outwork) vs. Kurd Maverick_Electro Rub
(Club)[Unknown].wav
[file://M:/Tracks/Year_2006/Week_38/Noir](file://M:/Tracks/Year_2006/Week_38/Noir) feat. Birago_Feel Alive
(Paul Thomas GK Electric)[Compulsive].mp3
[file://M:/Tracks/Year_2006/Week_38/Noir](file://M:/Tracks/Year_2006/Week_38/Noir) pres. Soul Flava_Hot
(Dub Deluxe)[Delecto].wav
[file://M:/Tracks/Year_2006/Week_38/Noir](file://M:/Tracks/Year_2006/Week_38/Noir) feat. Birago_Feel Alive
(Feel The Drum)[Compulsive].mp3
[file://M:/Tracks/Year_2006/Week_38/Noir](file://M:/Tracks/Year_2006/Week_38/Noir) feat. Birago_Feel Alive
(Original)[Compulsive].mp3
[file://M:/Tracks/Year_2006/Week_38/Ricky](file://M:/Tracks/Year_2006/Week_38/Ricky) L feat. M CK_Born Again
(Pastaboys Main)_[Data].mp3

- Action: "copy file names as URI" =>
Don't know the URI specification of a relative path yet but maybe:
[file://./Phunkkmob_Something's](file://./Phunkkmob_Something's) Gotta Give_(WaWa)_[Unknown].wav

Is that all or partially possible?

THANKS,

Not sure about the relative-URI one but the others are all possible, plus a few more:

FAQ: HOW TO: Copy selected filenames to the clipboard

Thanks a lot - I've searched only in the File menu - and not in the Edit menu. :wink:

But you have to know that your produced URI's are wrong!

You produce from the local file system an output like this:

file://\U:\Mixes\6%5f21%5f06%20catch%2022%20dance%20party%20mix%20part%201.mp3

but a "" is NOT allowed in an URI!

It must be:
file:///U:/Mixes/6%5f21%5f06%20catch%2022%20dance%20party%20mix%20part%201.mp3

This is a bug!

You also need not convert e.g. "_" and many other characters into escaped values.

RFC 2396 (ietf.org/rfc/rfc2396.txt)
RFC 2373 (ietf.org/rfc/rfc2373.txt)
RFC 2732 (ietf.org/rfc/rfc2732.txt)
RFC 3986 (ietf.org/rfc/rfc3986.txt)

=> when I test your URI - the IsURI function returns false.

=> when I test (my valid) URI I receive back this (parts from the RFC):

./URITest.pl

AbsPath: /U:/Mixes/6%5f21%5f06%20catch%2022%20dance%20party%20mix%20part%201.mp3
AbsoluteURI: file:///U:/Mixes/6%5f21%5f06%20catch%2022%20dance%20party%20mix%20part%201.mp3
Authority:
Fragment:
HierPart: ///U:/Mixes/6%5f21%5f06%20catch%2022%20dance%20party%20mix%20part%201.mp3
HostPort:
NetPath: ///U:/Mixes/6%5f21%5f06%20catch%2022%20dance%20party%20mix%20part%201.mp3
OpaquePart:
PathSegments: U:/Mixes/6%5f21%5f06%20catch%2022%20dance%20party%20mix%20part%201.mp3
Query:
RegName:
RelativeURI:
Scheme: file
Server:
URI: file:///U:/Mixes/6%5f21%5f06%20catch%2022%20dance%20party%20mix%20part%201.mp3
UserInfo:

Hopefully you can fix this bug.

Thanks,
Robert


PS: MAYBE YOU CAN SEE IN THIS FORUM that MY VALID URI is a HYPERLINK .. your bad URI IS NOT A HYPERLINK!

You should send GPSoft a bug report so it's on their to-do list.

Thanks,
Done

Your support request has been emailed to our support department. For future reference, the tracking number of this support request is 330027061891.

Also the HEX values in a URI (NOT URL anymore!) must be written in uppercase.

The specification http://www.ietf.org/rfc/rfc3986.txt is based on the ABNF http://www.ietf.org/rfc/rfc2234.txt and in this spec you can find HEXDIG defined as

HEXDIG =  DIGIT / "A" / "B" / "C" / "D" / "E" / "F"

but note:

in RFC 3986 - Page 11:

pct-encoded = "%" HEXDIG HEXDIG

The uppercase hexadecimal digits 'A' through 'F' are equivalent to the
lowercase digits 'a' through 'f', respectively. If two URIs differ only in
the case of hexadecimal digits used in percent-encoded octets, they are
equivalent. For consistency, URI producers and normalizers should use
uppercase hexadecimal digits for all percent- encodings.

[/url]

Does it really matter? Windows doesn't have a problem with URLs in this form (just paste one into the Start -> Run dialog and see for yourself), and a URL to a local file on your computer isn't really much use anywhere except on your computer - it's not like you can paste a file:// link to your blog and have it work when someone clicks it.

Hi,

maybe Windows works with it - I never saw or used a program who has produced this.

Maybe it only works because it was easier in the first days to add 'file://' instead of changing Windows 'inside'?

I MUST use URI's like that every day and forward this around in our bank - and not all have Windows - especially our operating team - they all have different Linux versions installed ... to who I've forward the URI's (where are the install scripts of our software ... etc). Maybe sooner or later I hate the manual overwork. Sometimes I've to forward URI's to people using the IBM 390 & TSO - we'll see if they are able to open the text files.

However, it's wrong and not defined in RFC - it depends on you which quality your software should have!

Robert

PS: It seems to me that nobody uses the RFC's (as long it works).

--- MS Visual Studio produces shit - maybe and HOPEFULLY they change it:

Berners-Lee, et al. Standards Track [Page 49]

RFC 3986 URI Generic Syntax January 2005

URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]

hier-part = "//" authority path-abempty
/ path-absolute
/ path-rootless
/ path-empty

path-abempty = *( "/" segment )
path-absolute = "/" [ segment-nz *( "/" segment ) ]
path-noscheme = segment-nz-nc *( "/" segment )
path-rootless = segment-nz *( "/" segment )
path-empty = 0

This might not be true in a corporate environment where most machines will have the same configuration, and where many people within a work group will have access to the same mapped network drive.

I'm also not able to copy & paste these wrong URI's into our own intranet application - programmed by myself. :wink:

I do agree that the slashes should be the right way around if it means you can paste file:// URLs into forums and emails and have them automatically detected. That can be useful if, for example, you want to tell someone to edit

file://\C:\WINDOWS\system32\drivers\etc\hosts

vs

file:///C:/WINDOWS/system32/drivers/etc/hosts

Re the case of the hex letters, it sounds more like a recommendation than a requirement. It says things should work with both types of letters but should use uppercase for consistentcy. "Should", not "must". But I bet it would be very easy to change to uppercase in the Opus code so I don't see why not.

So I agree that, since it is presumably easy to do, it would be better for Opus to follow the standard to the letter now that it's been pointed out. That said, I don't understand the example you gave. Why would you forward a file:// URL to a file on a Windows machine to someone on a UNIX machine? :slight_smile: The URL is useless to them, regardless of the slashes and hex letters, as it points to a file relative to a drive letter on a completely different machine.

As described as ABNF in RFC it's a MUST but of course it could be SHOULD (e.g. when you compare the URI's). Upper or Lower isn't the important thing. :wink:

[quote="nudel"]Why would you forward a file:// URL to a file on a Windows machine to someone on a UNIX machine?[/quote].

I forward a URI from network server - not locally on my machine. They could have drive letter or a network name. I also recommend to change the drive letter to the original network name when you create the URI.

This is also good because I've short cuts from my coworkers machine. When I want to forward the URI to another coworker he would receive the short cut - but he hasn't defined this short cut.

e.g. Instead of:

S:\graf\ReadMe.txt ... better: \\vie-fs01\data\graf\ReadMe.txt
file://\S:\graf\ReadMe.txt ... better:  file:////vie-fs01/data/graf/ReadMe.txt

(but I'm not sure yet how much / it should be after the schema :wink:)

Maybe this change above could be a preference setting or whatever.

So the guys from the operating know the machine name and can use the URI (or can make their changes easier).

I'm also not able to post a bad URI in our intranet applications because these applications check for a valid URI (thanks god - programmed by myself :wink:) and so I can not copy & paste the URI without a change. :bulb:

Cheers,
Robert

That's what the UNC mode of the command is for, although I'm not sure whether or not you can combine it with the URL mode. It'd make sense for the combination to be possible, though.

Re should vs must, the document says should. Either that part is wrong or the definition of HEXDIG is wrong. Therefore the entire URI RFC is invalid and the Internet should be destroyed immediately so we can start again!

FAQ: HOW TO: Copy selected filenames to the clipboard[/quote]

Hi, I've made this how described and it works with local + network drives - but not as right click when I'm on a FTP. The menu entries won't be shown.

How can I fix this - made available for FTP too?

Thanks