How can we use the current directory path(%~dp0) with 'ren' command in a batch file?
问题 I want to rename a file which is present in the sub directory and the known part of the file name is ' .log '. When I try something like below ren subdirectory\*.log* file2.txt or ren .\subdirectory\*.log* file2.txt I get error : The syntax of the command is incorrect. I have two questions here: Do I always need to give full path in ren command for file1? If yes, then how can I we give the full path if I do not want to hard code it? I got to know that we can use ' %~dp0 ' to get the current