I have been using the following command to get the file date. However, the fileDate variable has been returning blank value ever since we moved to a different s
fileDate
Change % to %% for use in batch file, for %~ta syntax enter call /?
%
%%
%~ta
call /?
for %a in (MyFile.txt) do set FileDate=%~ta
Sample output:
for %a in (MyFile.txt) do set FileDate=%~ta set FileDate=05/05/2020 09:47 AM for %a in (file_not_exist_file.txt) do set FileDate=%~ta set FileDate=