0

quick question. Have a batch file that will generate a .txt file when a .png is place into the directory. Will it be possible to include the date the .png was created next to the line with a "".

For example:

.png "9/14/2010"  
.png "9/14/2010"  
.png "9/14/2010"

right now I have this as my batch file: dir /B *.png > name.txt

which shows this

.png     
.png  
.png
1
  • You cannot have " in filenames, assuming you're in Windows. I can't comment on *nix since I have never tried there before :)
    – Dave
    Sep 15, 2010 at 5:02

1 Answer 1

2

Try this:

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

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.