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.
process
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.
|
show 1 more comment
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.
process
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 usingC:WindowsTempIrfanView%USERPROFILE%info_???.txtwould 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
|
show 1 more comment
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.
process
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
process
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.
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 usingC:WindowsTempIrfanView%USERPROFILE%info_???.txtwould 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
|
show 1 more comment
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 usingC:WindowsTempIrfanView%USERPROFILE%info_???.txtwould 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
|
show 1 more comment
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.
I use it in the bat fileget_resolution.batwhich 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 ofi_view64.exe. I need the process ID of the calling scriptget_resolution.bat.
– Francky Leyn
Nov 15 at 23:03
Do I have to use%USERNAME%? "echo %TEMP%" is equal toC: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"deliversCALL 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
|
show 2 more comments
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.
I use it in the bat fileget_resolution.batwhich 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 ofi_view64.exe. I need the process ID of the calling scriptget_resolution.bat.
– Francky Leyn
Nov 15 at 23:03
Do I have to use%USERNAME%? "echo %TEMP%" is equal toC: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"deliversCALL 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
|
show 2 more comments
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.
I use it in the bat fileget_resolution.batwhich 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 ofi_view64.exe. I need the process ID of the calling scriptget_resolution.bat.
– Francky Leyn
Nov 15 at 23:03
Do I have to use%USERNAME%? "echo %TEMP%" is equal toC: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"deliversCALL 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
|
show 2 more comments
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.
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.
edited Nov 16 at 16:49
answered Nov 15 at 21:07
HackSlash
1,6951620
1,6951620
I use it in the bat fileget_resolution.batwhich 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 ofi_view64.exe. I need the process ID of the calling scriptget_resolution.bat.
– Francky Leyn
Nov 15 at 23:03
Do I have to use%USERNAME%? "echo %TEMP%" is equal toC: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"deliversCALL 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
|
show 2 more comments
I use it in the bat fileget_resolution.batwhich 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 ofi_view64.exe. I need the process ID of the calling scriptget_resolution.bat.
– Francky Leyn
Nov 15 at 23:03
Do I have to use%USERNAME%? "echo %TEMP%" is equal toC: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"deliversCALL 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
|
show 2 more comments
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.
Francky Leyn is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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_???.txtwould 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