Navigation

4/09/2014

Generating URLs from a list of files in a directory

This code will take file names from a directory (eg all mp3 files) and create a URL in an output file.txt





REM dir /B  > AAoutputURLs.txt
REM for /d %%A in (*.mp3) do echo ^<root^>^<dir^>%%~A^</dir^>^</root^> >> AAoutput1.txt

REM "cmd /c  echo   Unless you have opted out, the Law Library posts URL links to the “Class Recordings” list located at http://columbo.law.cua.edu/search/r?SEARCH=class.  Access to the URL links is restricted to current CUA law students only.   >> AAoutput1.txt"

REM "cmd /c  echo If you wish to post your specific URL link(s) onto your TWEN webpage, please include the alert message for Mac users.  Thank you.  >> AAoutput1.txt"


forfiles /M *.mp3  /C "cmd /c  echo http://136.242.14.49/law.cua.edu/academicexcellence/2014Spring/@file>> AAoutput1.txt"
REM forfiles /M *.mp4  /C "cmd /c  echo http://136.242.14.49/law.cua.edu/academicexcellence/2014Spring/@file>> AAoutput1.txt"
forfiles /M *.wmv  /C "cmd /c  echo http://136.242.14.49/law.cua.edu/academicexcellence/2014Spring/@file>> AAoutput1.txt"

REM  next line puts in date
echo %date:~4,10% >> AAoutput1.txt
echo( >> AAoutput1.txtpause

No comments:

Post a Comment