I am trying to make a .bat file to edit the redirect in index.asp to be the filename of the file selected via the context menu option .bat file.
I know how to replace the file:
@echo OFF
del/q D:\e-lib\index.asp
copy %1 D:\e-lib\index.asp
but 开发者_运维知识库not how to edit the contents so that the redirect within index.asp points to the filename of the file I right-click, i.e the value %1.
I'm not sure about editing a file via DOS BATCH file, but you could easily pump in the contents of the file using the print command (e.g. "something" > file.asp). You could also build a template that reads in a text file via ASP, that has the contents of the data you need to include in your dynamic ASP file.
精彩评论