In SQL Server using xp_cmdshell, I was able to load files according to Modified date using a command for e.g.,
z: & forfiles /m *.jpg /s /d 07/16/2015 /c “cmd /c echo @fdate @ftime @path”
But I wanna know how to load files according to Created date. Any help would be very appreciated.
A question’s been asked on stackoverflow but no answer yet. Please take a look at the link for the details How to load files according to Created Date in Windows command prompt via SQL Server's xp_cmdshell
Best Answer
This is cheating a little bit, because it involves you compiling a little program that helps do this. It involves a little simple c# program but mostly cmd.
The thinking is, if only cmd included a program/command that when given a filename, it'd give give on one line, the file's full path and creation date/time. Then in cmd one could use a cmd's for command, applying that (show file's path and creation date/time) command to every file. So i've written a little program that can take a filename and show its full path and creation date/time. And then I use it in cmd.
The program..
Compiling it
so that creates a.exe
a.exe is a little program that when passed a filename as a parameter, gives the full path and creation date/time
The rest is cmd
If you don't have a C# compiler
I've included a link here to a.cs (the source code above) a.exe and since chrome tries to block any exe, you could download a.ex2 and rename it. Or when Chrome tries to block the exe then say "dismiss" and go to downloads within chrome and say recover file. But however you want to do it, you can get that EXE. Maybe visual studio express (like a free small version of visual studio) will have csc.exe letting you compile it, if you want to do it that way.
http://ge.tt/2LdAiGN2
Once you have that little program then you can do this in cmd
So what you can do, is do that command but dumped to a file
Then you can use find or gnuwin32's grep
or with gnuwin32's grep