Search found 4 matches
- 11 Apr 2016 00:47
- Forum: DOS Batch Forum
- Topic: Set parameters by filename in working directory
- Replies: 7
- Views: 4583
Re: Set parameters by filename in working directory
penpen, I see what you are saying. Honestly, none of those points even occurred to me, that's how little I know of what I am asking. for %%a in (file1*.*) do set "var=%%~Na" But... Thank you Aacini, that is exactly (as far as I know) what I am looking for. It seems to work perfect. I will ...
- 10 Apr 2016 16:27
- Forum: DOS Batch Forum
- Topic: Set parameters by filename in working directory
- Replies: 7
- Views: 4583
Re: Set parameters by filename in working directory
Oh well I suppose. I honestly have no idea to be more specific. I am speaking about some extremely basic things here and speaking at a kindergarten level is the only way to make it more simple, I just don't know how to make it happen in a batch. It's a waste of time to help and that's why people sti...
- 09 Apr 2016 13:08
- Forum: DOS Batch Forum
- Topic: Set parameters by filename in working directory
- Replies: 7
- Views: 4583
Re: Set parameters by filename in working directory
I want to set variables based of of files that are in the same working directory as the batch. There are parts of the file's names that are constant but some parts may change and I want to know if there is a way to have to batch file check, using the constant portion, for the file then grab the name...
- 08 Apr 2016 21:35
- Forum: DOS Batch Forum
- Topic: Set parameters by filename in working directory
- Replies: 7
- Views: 4583
Set parameters by filename in working directory
Is there a way to set a parameter to the full name of a file when giving a portion of the name in a batch script? Like, if I have Stuff.bat and file1-v2.5.exe in a folder, Is there a way to have it find a file with "file1" in the name then set "var=file1-v2.5" and if I rename it ...