PDA

View Full Version : Soft x creare link automaticamente


marchez
24-09-2003, 18:01
una strana richiesta,
esiste un software che esplorando una cartella e relative sottocartelle,
"vede" tutti i files con una determinata estensione e ne crea automaticamente il link,
che poi puo' essere copiabile in una pagina web o in un documento excel,
nel mio caso sono quasi un migliaio di files, sparsi tra alcuni altri, da cui devo creare il link,
impresa faticosa

zuper
24-09-2003, 20:47
Originariamente inviato da marchez
una strana richiesta,
esiste un software che esplorando una cartella e relative sottocartelle,
"vede" tutti i files con una determinata estensione e ne crea automaticamente il link,
che poi puo' essere copiabile in una pagina web o in un documento excel,
nel mio caso sono quasi un migliaio di files, sparsi tra alcuni altri, da cui devo creare il link,
impresa faticosa

non so se questo ti puņ andare bene



echo ^<html^>^<body^> > prova.html & for /r %N in (*.mp3) do @echo ^<li^>^<a href="file://%N"^>%~nN^</a^>^</li^> >> prova.html & echo ^</body^>^</html^> >> prova.html


copia tutto in un prompt di dos, lancialo dalla cartella principale e chiaramente cmabia l'estensione mp3 con quello che vuoi

PS: mi scuso con l'autore del code ma non mi ricordo + chi č e non posso attribuirgli i meritatissimi CREDITI ;)

marchez
25-09-2003, 09:10
ottimo, grazie zuper, veramente semplice e veloce,
complimenti anche a chi l'ha scritto,

cosi' crea automaticamente un file "prova.html" con all'interno tutti i link ai files,
usando come testo il nome del file stesso,
per esempio: LISTA.m3u
io pero' vorrei come testo il percorso di tali file:
per esempio: T\Tuxedomoon\Ship Of Fools\LISTA.m3u

questo perche come si capisce dall'esempio i miei files si chiamano tutti allo stesso modo,

credo si tratta di una piccola modifica,

meglio ancora sarebbe poter stabilire il livello delle cartelle da inserire nel testo, cosi' da avere: Tuxedomoon\Ship Of Fools

ma sarebbe davvero chiedere troppo

zuper
25-09-2003, 11:17
You can now use the following optional syntax:

%~I - expands %I removing any surrounding quotes (")
%~fI - expands %I to a fully qualified path name
%~dI - expands %I to a drive letter only
%~pI - expands %I to a path only
%~nI - expands %I to a file name only
%~xI - expands %I to a file extension only
%~sI - expanded path contains short names only
%~aI - expands %I to file attributes of file
%~tI - expands %I to date/time of file
%~zI - expands %I to size of file
%~$PATH:I - searches the directories listed in the PATH
environment variable and expands %I to the
fully qualified name of the first one found.
If the environment variable name is not
defined or the file is not found by the
search, then this modifier expands to the
empty string

The modifiers can be combined to get compound results:

%~dpI - expands %I to a drive letter and path only
%~nxI - expands %I to a file name and extension only
%~fsI - expands %I to a full path name with short names only
%~dp$PATH:I - searches the directories listed in the PATH
environment variable for %I and expands to the
drive letter and path of the first one found.
%~ftzaI - expands %I to a DIR like output line

marchez
25-09-2003, 15:08
con le guide in inglese ho qualche problema,
hai qualche link a siti italiani per approfondire l'argomento,