unique identifier for a DOS process on 1 single machine











up vote
1
down vote

favorite












I use a Win 10 machine with different users, and these all can use a same bat file.



In the bat scripts I need a temporary file with an unique name consisting of an identfier for the process currently at hand on that machine. There thus can be multiple such processes at the same time.



As file name a want to use C:WindowsTemp???.txt.



The question is what ??? must be.










share|improve this question







New contributor




Francky Leyn is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 2




    You should never put your own files in C:Windows. Why don't you put these files in %USERPROFILE% ?
    – Jamie Hanrahan
    Nov 15 at 18:50










  • Or some completely different folder that can be accessed by everyone. What does "process currently at hand" mean? Why can't you name the file with whatever unique identifier you want?
    – Aulis Ronkainen
    Nov 15 at 19:16










  • The command at hand is i_view64.exe, the 64 bit bitmap image editor Irfanview. I use it as follows: i_view64.exe inputfile.jpg /info=???.txt. ??? must cover different users on that same machine, and also multiple such commands by the same user on that same machine. Under *NIX/POSIX this is $$. I don't know what it is on DOS.
    – Francky Leyn
    Nov 15 at 19:32












  • I also want to use `C:` because that partition on the multitask/multiuser PC is on a SSD drive and this is faster than the other HDD's of that PC. Under *NIX one has /tmp/$$ for a fast drive. On that PC machine it is the SSD which is fastest. The i_view64.exe command makes part of bat scripts that contain FOR commands on eg 380 .png files. This thakes easily 10 minutes. I have a virtual *NIX on that PC, but I don't want to use it. I want to use DOS because that Win 10 PC is mainly DOS based.
    – Francky Leyn
    Nov 15 at 20:09










  • So using C:WindowsTempIrfanView%USERPROFILE%info_???.txt would be a first attempt. In that case one only have to take into account ??? for the different processes started up by the same user at the same time on that machine.
    – Francky Leyn
    Nov 15 at 20:23















up vote
1
down vote

favorite












I use a Win 10 machine with different users, and these all can use a same bat file.



In the bat scripts I need a temporary file with an unique name consisting of an identfier for the process currently at hand on that machine. There thus can be multiple such processes at the same time.



As file name a want to use C:WindowsTemp???.txt.



The question is what ??? must be.










share|improve this question







New contributor




Francky Leyn is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 2




    You should never put your own files in C:Windows. Why don't you put these files in %USERPROFILE% ?
    – Jamie Hanrahan
    Nov 15 at 18:50










  • Or some completely different folder that can be accessed by everyone. What does "process currently at hand" mean? Why can't you name the file with whatever unique identifier you want?
    – Aulis Ronkainen
    Nov 15 at 19:16










  • The command at hand is i_view64.exe, the 64 bit bitmap image editor Irfanview. I use it as follows: i_view64.exe inputfile.jpg /info=???.txt. ??? must cover different users on that same machine, and also multiple such commands by the same user on that same machine. Under *NIX/POSIX this is $$. I don't know what it is on DOS.
    – Francky Leyn
    Nov 15 at 19:32












  • I also want to use `C:` because that partition on the multitask/multiuser PC is on a SSD drive and this is faster than the other HDD's of that PC. Under *NIX one has /tmp/$$ for a fast drive. On that PC machine it is the SSD which is fastest. The i_view64.exe command makes part of bat scripts that contain FOR commands on eg 380 .png files. This thakes easily 10 minutes. I have a virtual *NIX on that PC, but I don't want to use it. I want to use DOS because that Win 10 PC is mainly DOS based.
    – Francky Leyn
    Nov 15 at 20:09










  • So using C:WindowsTempIrfanView%USERPROFILE%info_???.txt would be a first attempt. In that case one only have to take into account ??? for the different processes started up by the same user at the same time on that machine.
    – Francky Leyn
    Nov 15 at 20:23













up vote
1
down vote

favorite









up vote
1
down vote

favorite











I use a Win 10 machine with different users, and these all can use a same bat file.



In the bat scripts I need a temporary file with an unique name consisting of an identfier for the process currently at hand on that machine. There thus can be multiple such processes at the same time.



As file name a want to use C:WindowsTemp???.txt.



The question is what ??? must be.










share|improve this question







New contributor




Francky Leyn is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I use a Win 10 machine with different users, and these all can use a same bat file.



In the bat scripts I need a temporary file with an unique name consisting of an identfier for the process currently at hand on that machine. There thus can be multiple such processes at the same time.



As file name a want to use C:WindowsTemp???.txt.



The question is what ??? must be.







process






share|improve this question







New contributor




Francky Leyn is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question







New contributor




Francky Leyn is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question






New contributor




Francky Leyn is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Nov 15 at 18:35









Francky Leyn

223




223




New contributor




Francky Leyn is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Francky Leyn is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Francky Leyn is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








  • 2




    You should never put your own files in C:Windows. Why don't you put these files in %USERPROFILE% ?
    – Jamie Hanrahan
    Nov 15 at 18:50










  • Or some completely different folder that can be accessed by everyone. What does "process currently at hand" mean? Why can't you name the file with whatever unique identifier you want?
    – Aulis Ronkainen
    Nov 15 at 19:16










  • The command at hand is i_view64.exe, the 64 bit bitmap image editor Irfanview. I use it as follows: i_view64.exe inputfile.jpg /info=???.txt. ??? must cover different users on that same machine, and also multiple such commands by the same user on that same machine. Under *NIX/POSIX this is $$. I don't know what it is on DOS.
    – Francky Leyn
    Nov 15 at 19:32












  • I also want to use `C:` because that partition on the multitask/multiuser PC is on a SSD drive and this is faster than the other HDD's of that PC. Under *NIX one has /tmp/$$ for a fast drive. On that PC machine it is the SSD which is fastest. The i_view64.exe command makes part of bat scripts that contain FOR commands on eg 380 .png files. This thakes easily 10 minutes. I have a virtual *NIX on that PC, but I don't want to use it. I want to use DOS because that Win 10 PC is mainly DOS based.
    – Francky Leyn
    Nov 15 at 20:09










  • So using C:WindowsTempIrfanView%USERPROFILE%info_???.txt would be a first attempt. In that case one only have to take into account ??? for the different processes started up by the same user at the same time on that machine.
    – Francky Leyn
    Nov 15 at 20:23














  • 2




    You should never put your own files in C:Windows. Why don't you put these files in %USERPROFILE% ?
    – Jamie Hanrahan
    Nov 15 at 18:50










  • Or some completely different folder that can be accessed by everyone. What does "process currently at hand" mean? Why can't you name the file with whatever unique identifier you want?
    – Aulis Ronkainen
    Nov 15 at 19:16










  • The command at hand is i_view64.exe, the 64 bit bitmap image editor Irfanview. I use it as follows: i_view64.exe inputfile.jpg /info=???.txt. ??? must cover different users on that same machine, and also multiple such commands by the same user on that same machine. Under *NIX/POSIX this is $$. I don't know what it is on DOS.
    – Francky Leyn
    Nov 15 at 19:32












  • I also want to use `C:` because that partition on the multitask/multiuser PC is on a SSD drive and this is faster than the other HDD's of that PC. Under *NIX one has /tmp/$$ for a fast drive. On that PC machine it is the SSD which is fastest. The i_view64.exe command makes part of bat scripts that contain FOR commands on eg 380 .png files. This thakes easily 10 minutes. I have a virtual *NIX on that PC, but I don't want to use it. I want to use DOS because that Win 10 PC is mainly DOS based.
    – Francky Leyn
    Nov 15 at 20:09










  • So using C:WindowsTempIrfanView%USERPROFILE%info_???.txt would be a first attempt. In that case one only have to take into account ??? for the different processes started up by the same user at the same time on that machine.
    – Francky Leyn
    Nov 15 at 20:23








2




2




You should never put your own files in C:Windows. Why don't you put these files in %USERPROFILE% ?
– Jamie Hanrahan
Nov 15 at 18:50




You should never put your own files in C:Windows. Why don't you put these files in %USERPROFILE% ?
– Jamie Hanrahan
Nov 15 at 18:50












Or some completely different folder that can be accessed by everyone. What does "process currently at hand" mean? Why can't you name the file with whatever unique identifier you want?
– Aulis Ronkainen
Nov 15 at 19:16




Or some completely different folder that can be accessed by everyone. What does "process currently at hand" mean? Why can't you name the file with whatever unique identifier you want?
– Aulis Ronkainen
Nov 15 at 19:16












The command at hand is i_view64.exe, the 64 bit bitmap image editor Irfanview. I use it as follows: i_view64.exe inputfile.jpg /info=???.txt. ??? must cover different users on that same machine, and also multiple such commands by the same user on that same machine. Under *NIX/POSIX this is $$. I don't know what it is on DOS.
– Francky Leyn
Nov 15 at 19:32






The command at hand is i_view64.exe, the 64 bit bitmap image editor Irfanview. I use it as follows: i_view64.exe inputfile.jpg /info=???.txt. ??? must cover different users on that same machine, and also multiple such commands by the same user on that same machine. Under *NIX/POSIX this is $$. I don't know what it is on DOS.
– Francky Leyn
Nov 15 at 19:32














I also want to use `C:` because that partition on the multitask/multiuser PC is on a SSD drive and this is faster than the other HDD's of that PC. Under *NIX one has /tmp/$$ for a fast drive. On that PC machine it is the SSD which is fastest. The i_view64.exe command makes part of bat scripts that contain FOR commands on eg 380 .png files. This thakes easily 10 minutes. I have a virtual *NIX on that PC, but I don't want to use it. I want to use DOS because that Win 10 PC is mainly DOS based.
– Francky Leyn
Nov 15 at 20:09




I also want to use `C:` because that partition on the multitask/multiuser PC is on a SSD drive and this is faster than the other HDD's of that PC. Under *NIX one has /tmp/$$ for a fast drive. On that PC machine it is the SSD which is fastest. The i_view64.exe command makes part of bat scripts that contain FOR commands on eg 380 .png files. This thakes easily 10 minutes. I have a virtual *NIX on that PC, but I don't want to use it. I want to use DOS because that Win 10 PC is mainly DOS based.
– Francky Leyn
Nov 15 at 20:09












So using C:WindowsTempIrfanView%USERPROFILE%info_???.txt would be a first attempt. In that case one only have to take into account ??? for the different processes started up by the same user at the same time on that machine.
– Francky Leyn
Nov 15 at 20:23




So using C:WindowsTempIrfanView%USERPROFILE%info_???.txt would be a first attempt. In that case one only have to take into account ??? for the different processes started up by the same user at the same time on that machine.
– Francky Leyn
Nov 15 at 20:23










1 Answer
1






active

oldest

votes

















up vote
0
down vote













The Answer



If you want to use the PID of cmd.exe then do this:



title=uniqueTitle
for /f "tokens=2 USEBACKQ" %f IN (`tasklist /NH /FI "WINDOWTITLE eq uniqueTitle*"`) Do set ourPID=%f
i_view64.exe inputfile.jpg /info=%temp%%ourPID%.txt


Me rambling because I didn't understand the question:



In the context of a batch file running the "current process at hand" is that of the command interpreter (conhost.exe or cmd.exe). If you want to get the process ID of the i_view64.exe you would have to first run it and then get the process ID (which is non-trivial). In your case you are asking for the process ID before it has been created. There is no way to predict what it will be at the time you are feeding a command line argument to the process, as it hasn't started.



If you just want a unique temporary file name in a safe, reliable location then you should check out this question:



https://stackoverflow.com/questions/27802376/create-unique-file-name-windows-batch



There are a number of suggested solutions.



Generally you use %TEMP% to get the temp location on the system. Then you generate your filename.



something like this might work for you:



%temp%%username%-%date%-%random%.txt


Adjust as needed. Each of those variables expand to create a full path to a file.






share|improve this answer























  • I use it in the bat file get_resolution.bat which contains:
    – Francky Leyn
    Nov 15 at 22:57










  • i_view64.exe jpg_inputfile.jpg /info=textfile.txt. So, I do not need the process ID of i_view64.exe. I need the process ID of the calling script get_resolution.bat.
    – Francky Leyn
    Nov 15 at 23:03










  • Do I have to use %USERNAME%? "echo %TEMP%" is equal to C:UsersFRANCK~1AppDataLocalTemp. What means that "~" anyway? "echo %USERNAME%" delivers "Francky Leyn"
    – Francky Leyn
    Nov 16 at 2:55












  • CALL i_view64.exe "input.jpg" /info=%TEMP%IrfanViewinfo_%DATE%-%TIME%-%RANDOM%.txt" delivers CALL i_view64.exe "input.jpg" /info="C:UsersFRANCK~1AppDataLocalTempIrfanViewinfo_Fri 11/16/2018- 9:44:27.14-13375.txt". Why the space after %DATE%-?
    – Francky Leyn
    Nov 16 at 8:54










  • K:test>ECHO %TIME% 12:38:21.00
    – Francky Leyn
    Nov 16 at 11:40











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});






Francky Leyn is a new contributor. Be nice, and check out our Code of Conduct.










 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1375770%2funique-identifier-for-a-dos-process-on-1-single-machine%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













The Answer



If you want to use the PID of cmd.exe then do this:



title=uniqueTitle
for /f "tokens=2 USEBACKQ" %f IN (`tasklist /NH /FI "WINDOWTITLE eq uniqueTitle*"`) Do set ourPID=%f
i_view64.exe inputfile.jpg /info=%temp%%ourPID%.txt


Me rambling because I didn't understand the question:



In the context of a batch file running the "current process at hand" is that of the command interpreter (conhost.exe or cmd.exe). If you want to get the process ID of the i_view64.exe you would have to first run it and then get the process ID (which is non-trivial). In your case you are asking for the process ID before it has been created. There is no way to predict what it will be at the time you are feeding a command line argument to the process, as it hasn't started.



If you just want a unique temporary file name in a safe, reliable location then you should check out this question:



https://stackoverflow.com/questions/27802376/create-unique-file-name-windows-batch



There are a number of suggested solutions.



Generally you use %TEMP% to get the temp location on the system. Then you generate your filename.



something like this might work for you:



%temp%%username%-%date%-%random%.txt


Adjust as needed. Each of those variables expand to create a full path to a file.






share|improve this answer























  • I use it in the bat file get_resolution.bat which contains:
    – Francky Leyn
    Nov 15 at 22:57










  • i_view64.exe jpg_inputfile.jpg /info=textfile.txt. So, I do not need the process ID of i_view64.exe. I need the process ID of the calling script get_resolution.bat.
    – Francky Leyn
    Nov 15 at 23:03










  • Do I have to use %USERNAME%? "echo %TEMP%" is equal to C:UsersFRANCK~1AppDataLocalTemp. What means that "~" anyway? "echo %USERNAME%" delivers "Francky Leyn"
    – Francky Leyn
    Nov 16 at 2:55












  • CALL i_view64.exe "input.jpg" /info=%TEMP%IrfanViewinfo_%DATE%-%TIME%-%RANDOM%.txt" delivers CALL i_view64.exe "input.jpg" /info="C:UsersFRANCK~1AppDataLocalTempIrfanViewinfo_Fri 11/16/2018- 9:44:27.14-13375.txt". Why the space after %DATE%-?
    – Francky Leyn
    Nov 16 at 8:54










  • K:test>ECHO %TIME% 12:38:21.00
    – Francky Leyn
    Nov 16 at 11:40















up vote
0
down vote













The Answer



If you want to use the PID of cmd.exe then do this:



title=uniqueTitle
for /f "tokens=2 USEBACKQ" %f IN (`tasklist /NH /FI "WINDOWTITLE eq uniqueTitle*"`) Do set ourPID=%f
i_view64.exe inputfile.jpg /info=%temp%%ourPID%.txt


Me rambling because I didn't understand the question:



In the context of a batch file running the "current process at hand" is that of the command interpreter (conhost.exe or cmd.exe). If you want to get the process ID of the i_view64.exe you would have to first run it and then get the process ID (which is non-trivial). In your case you are asking for the process ID before it has been created. There is no way to predict what it will be at the time you are feeding a command line argument to the process, as it hasn't started.



If you just want a unique temporary file name in a safe, reliable location then you should check out this question:



https://stackoverflow.com/questions/27802376/create-unique-file-name-windows-batch



There are a number of suggested solutions.



Generally you use %TEMP% to get the temp location on the system. Then you generate your filename.



something like this might work for you:



%temp%%username%-%date%-%random%.txt


Adjust as needed. Each of those variables expand to create a full path to a file.






share|improve this answer























  • I use it in the bat file get_resolution.bat which contains:
    – Francky Leyn
    Nov 15 at 22:57










  • i_view64.exe jpg_inputfile.jpg /info=textfile.txt. So, I do not need the process ID of i_view64.exe. I need the process ID of the calling script get_resolution.bat.
    – Francky Leyn
    Nov 15 at 23:03










  • Do I have to use %USERNAME%? "echo %TEMP%" is equal to C:UsersFRANCK~1AppDataLocalTemp. What means that "~" anyway? "echo %USERNAME%" delivers "Francky Leyn"
    – Francky Leyn
    Nov 16 at 2:55












  • CALL i_view64.exe "input.jpg" /info=%TEMP%IrfanViewinfo_%DATE%-%TIME%-%RANDOM%.txt" delivers CALL i_view64.exe "input.jpg" /info="C:UsersFRANCK~1AppDataLocalTempIrfanViewinfo_Fri 11/16/2018- 9:44:27.14-13375.txt". Why the space after %DATE%-?
    – Francky Leyn
    Nov 16 at 8:54










  • K:test>ECHO %TIME% 12:38:21.00
    – Francky Leyn
    Nov 16 at 11:40













up vote
0
down vote










up vote
0
down vote









The Answer



If you want to use the PID of cmd.exe then do this:



title=uniqueTitle
for /f "tokens=2 USEBACKQ" %f IN (`tasklist /NH /FI "WINDOWTITLE eq uniqueTitle*"`) Do set ourPID=%f
i_view64.exe inputfile.jpg /info=%temp%%ourPID%.txt


Me rambling because I didn't understand the question:



In the context of a batch file running the "current process at hand" is that of the command interpreter (conhost.exe or cmd.exe). If you want to get the process ID of the i_view64.exe you would have to first run it and then get the process ID (which is non-trivial). In your case you are asking for the process ID before it has been created. There is no way to predict what it will be at the time you are feeding a command line argument to the process, as it hasn't started.



If you just want a unique temporary file name in a safe, reliable location then you should check out this question:



https://stackoverflow.com/questions/27802376/create-unique-file-name-windows-batch



There are a number of suggested solutions.



Generally you use %TEMP% to get the temp location on the system. Then you generate your filename.



something like this might work for you:



%temp%%username%-%date%-%random%.txt


Adjust as needed. Each of those variables expand to create a full path to a file.






share|improve this answer














The Answer



If you want to use the PID of cmd.exe then do this:



title=uniqueTitle
for /f "tokens=2 USEBACKQ" %f IN (`tasklist /NH /FI "WINDOWTITLE eq uniqueTitle*"`) Do set ourPID=%f
i_view64.exe inputfile.jpg /info=%temp%%ourPID%.txt


Me rambling because I didn't understand the question:



In the context of a batch file running the "current process at hand" is that of the command interpreter (conhost.exe or cmd.exe). If you want to get the process ID of the i_view64.exe you would have to first run it and then get the process ID (which is non-trivial). In your case you are asking for the process ID before it has been created. There is no way to predict what it will be at the time you are feeding a command line argument to the process, as it hasn't started.



If you just want a unique temporary file name in a safe, reliable location then you should check out this question:



https://stackoverflow.com/questions/27802376/create-unique-file-name-windows-batch



There are a number of suggested solutions.



Generally you use %TEMP% to get the temp location on the system. Then you generate your filename.



something like this might work for you:



%temp%%username%-%date%-%random%.txt


Adjust as needed. Each of those variables expand to create a full path to a file.







share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 16 at 16:49

























answered Nov 15 at 21:07









HackSlash

1,6951620




1,6951620












  • I use it in the bat file get_resolution.bat which contains:
    – Francky Leyn
    Nov 15 at 22:57










  • i_view64.exe jpg_inputfile.jpg /info=textfile.txt. So, I do not need the process ID of i_view64.exe. I need the process ID of the calling script get_resolution.bat.
    – Francky Leyn
    Nov 15 at 23:03










  • Do I have to use %USERNAME%? "echo %TEMP%" is equal to C:UsersFRANCK~1AppDataLocalTemp. What means that "~" anyway? "echo %USERNAME%" delivers "Francky Leyn"
    – Francky Leyn
    Nov 16 at 2:55












  • CALL i_view64.exe "input.jpg" /info=%TEMP%IrfanViewinfo_%DATE%-%TIME%-%RANDOM%.txt" delivers CALL i_view64.exe "input.jpg" /info="C:UsersFRANCK~1AppDataLocalTempIrfanViewinfo_Fri 11/16/2018- 9:44:27.14-13375.txt". Why the space after %DATE%-?
    – Francky Leyn
    Nov 16 at 8:54










  • K:test>ECHO %TIME% 12:38:21.00
    – Francky Leyn
    Nov 16 at 11:40


















  • I use it in the bat file get_resolution.bat which contains:
    – Francky Leyn
    Nov 15 at 22:57










  • i_view64.exe jpg_inputfile.jpg /info=textfile.txt. So, I do not need the process ID of i_view64.exe. I need the process ID of the calling script get_resolution.bat.
    – Francky Leyn
    Nov 15 at 23:03










  • Do I have to use %USERNAME%? "echo %TEMP%" is equal to C:UsersFRANCK~1AppDataLocalTemp. What means that "~" anyway? "echo %USERNAME%" delivers "Francky Leyn"
    – Francky Leyn
    Nov 16 at 2:55












  • CALL i_view64.exe "input.jpg" /info=%TEMP%IrfanViewinfo_%DATE%-%TIME%-%RANDOM%.txt" delivers CALL i_view64.exe "input.jpg" /info="C:UsersFRANCK~1AppDataLocalTempIrfanViewinfo_Fri 11/16/2018- 9:44:27.14-13375.txt". Why the space after %DATE%-?
    – Francky Leyn
    Nov 16 at 8:54










  • K:test>ECHO %TIME% 12:38:21.00
    – Francky Leyn
    Nov 16 at 11:40
















I use it in the bat file get_resolution.bat which contains:
– Francky Leyn
Nov 15 at 22:57




I use it in the bat file get_resolution.bat which contains:
– Francky Leyn
Nov 15 at 22:57












i_view64.exe jpg_inputfile.jpg /info=textfile.txt. So, I do not need the process ID of i_view64.exe. I need the process ID of the calling script get_resolution.bat.
– Francky Leyn
Nov 15 at 23:03




i_view64.exe jpg_inputfile.jpg /info=textfile.txt. So, I do not need the process ID of i_view64.exe. I need the process ID of the calling script get_resolution.bat.
– Francky Leyn
Nov 15 at 23:03












Do I have to use %USERNAME%? "echo %TEMP%" is equal to C:UsersFRANCK~1AppDataLocalTemp. What means that "~" anyway? "echo %USERNAME%" delivers "Francky Leyn"
– Francky Leyn
Nov 16 at 2:55






Do I have to use %USERNAME%? "echo %TEMP%" is equal to C:UsersFRANCK~1AppDataLocalTemp. What means that "~" anyway? "echo %USERNAME%" delivers "Francky Leyn"
– Francky Leyn
Nov 16 at 2:55














CALL i_view64.exe "input.jpg" /info=%TEMP%IrfanViewinfo_%DATE%-%TIME%-%RANDOM%.txt" delivers CALL i_view64.exe "input.jpg" /info="C:UsersFRANCK~1AppDataLocalTempIrfanViewinfo_Fri 11/16/2018- 9:44:27.14-13375.txt". Why the space after %DATE%-?
– Francky Leyn
Nov 16 at 8:54




CALL i_view64.exe "input.jpg" /info=%TEMP%IrfanViewinfo_%DATE%-%TIME%-%RANDOM%.txt" delivers CALL i_view64.exe "input.jpg" /info="C:UsersFRANCK~1AppDataLocalTempIrfanViewinfo_Fri 11/16/2018- 9:44:27.14-13375.txt". Why the space after %DATE%-?
– Francky Leyn
Nov 16 at 8:54












K:test>ECHO %TIME% 12:38:21.00
– Francky Leyn
Nov 16 at 11:40




K:test>ECHO %TIME% 12:38:21.00
– Francky Leyn
Nov 16 at 11:40










Francky Leyn is a new contributor. Be nice, and check out our Code of Conduct.










 

draft saved


draft discarded


















Francky Leyn is a new contributor. Be nice, and check out our Code of Conduct.













Francky Leyn is a new contributor. Be nice, and check out our Code of Conduct.












Francky Leyn is a new contributor. Be nice, and check out our Code of Conduct.















 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1375770%2funique-identifier-for-a-dos-process-on-1-single-machine%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

What is the Guru Parampara of Kashmiri Shaivism?

Герой Советского Союза

AnyDesk - Fatal Program Failure