1.

Solve : how to pass filename as parameter in a folder?

Answer»

I would like to pass the filename in a specific FOLDER as a parameter to run a process. May I know how to write the script.If you mean the file name of the batchfile, it is %0 in the script.

uliactually is i'm running a program to process the files like abc.exe -abc.mdl file. By which after running the abc.mdl i would like the abc.exe CONTINUE to run cde.mdl which STORE in the same folder as abc.mdl.This might work:

CODE: [Select]
for /f %%a in ('dir path\*.mdl /s /b') do (abc %%a)


Change path to something valid for your machine. Note: Written for use in a batch file. If running from the command line use:

Code: [Select]
for /f %a in ('dir path\*.mdl /s /b') do (abc %a)


Hope this HELPS. yup it works thanks



Discussion

No Comment Found