Is it possible to use a text file as input inside a batch file? I can build a string in MS Access, but it doesn't let me save it as a *.bat file. I can save it as a *.txt file, but that does little good for my end goal. I need a batch file to merge, rename, manipulate files. The filenames will constantly change.
In my simple mind the batch would be something like:
Execute ThisTextFile.txt
And I would be constantly rewriting ThisTextFile.txt as needed.
Any suggestions to get this done?
Thanks!
Batch file with config file
Moderator: DosItHelp
Re: Batch file with config file
You can't execute a txt file. And since you didn't say anything about its content we don't even know whether it contains any executable script code. If it contains Batch code then rename it with extension bat and call it.
Steffen
Steffen
Re: Batch file with config file
It sounds like you are trying to dynamically write a batch script. That should not be necessary.
Except in very rare circumstances, you should be able to write a static batch script that reads and processes a data (.txt) file with FOR /F.
You can dynamically create the .txt file with MS Access. The file can contain a list of files and/or folders. You could possibly include some keyword(s) to indicate what you want to do with each file.
Then simply run your batch script and let it read the keywords and files and process each one.
Dave Benham
Except in very rare circumstances, you should be able to write a static batch script that reads and processes a data (.txt) file with FOR /F.
You can dynamically create the .txt file with MS Access. The file can contain a list of files and/or folders. You could possibly include some keyword(s) to indicate what you want to do with each file.
Then simply run your batch script and let it read the keywords and files and process each one.
Dave Benham