开发者

batch file for .png and Julian Dates

开发者 https://www.devze.com 2023-01-16 11:57 出处:网络
quick question. I have a .png format file in Julian dates as the name with sample included in the name . so something like 2006090sample.png. Right now I have a batch file that generates a name.txt fi

quick question. I have a .png format file in Julian dates as the name with sample included in the name . so something like 2006090sample.png. Right now I have a batch file that generates a name.txt file to show the name of the .png as a list

For example:

name.txt

2006090sample.png

2006091sample.png

2006093sample.png

wanted to know if it was possible to write a batch file with the png name and the julian dates next to it and have a "" in it.

Like this.

2006090sample.png "Wed, 21 May 780 12:00:00 GMT"

2006091sample.png "Thu, 22 May 780 12:00:00 GMT"

2006092sample.png "Fri, 23 May 780 12:00:00 GMT"

Or would I need to create a batch file to rewrite the name everytime a .png is drop to only have the julian date.

Rig开发者_高级运维ht now I only have

dir /B *.png > name.txt

which shows in my name.txt

2006090sample.png


@echo off
del /q /f name.txt
for %%i in (*.png) do echo %%i "%%~ti" >> name.txt
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号