Folderize Files: move file into a sub-dir named like the file's date

English support forum

Moderators: white, Hacker, petermad, Stefan2

msrox
Member
Member
Posts: 101
Joined: 2008-03-14, 00:10 UTC

Post by *msrox »

Thank you very much.
It is great.
But It seems it has a problem because it moves SOME pictures in wrong folders. I can send some of them to you to check it yourself.
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

I guess it would be better to tell using one or two examples
- what is the file date (+ time) of those files?
- how is the folder named, which they are moved into? (complete path would be best)
- maybe the file name, but I don't think that makes a difference
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
msrox
Member
Member
Posts: 101
Joined: 2008-03-14, 00:10 UTC

Post by *msrox »

For example:

The file original date and time is : 10/17/2007 8:55:56 PM
The folder name which the file has been moved to is : 20071018 (I changed the code to creates folders without -)
The file name is : DSC08729.JPG

What's wrong?
User avatar
petermad
Power Member
Power Member
Posts: 14808
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

2msrox
As I wrote before I have WinXP Professional SP2
Not that it matters now (StatusQuo seem to have fixed your problem) - but where have you written that before ? :o
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

2msrox
This looks like a time zone problem (some hours later the date would have been correct), but I can't see this effect here.
If you enter

Code: Select all

for %e in (*.*) do @echo %~te %~nxe
on the command line, you get the date and time of every file in the current folder displayed, how they are reported by the console (FOR command).
- These must be different from the "real" file dates then, right?

- What date/time does the DIR command report - the real or the fake one?
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
msrox
Member
Member
Posts: 101
Joined: 2008-03-14, 00:10 UTC

Post by *msrox »

the output is :
uploads*screenshot-program*c0m**my*php?image=upl0336235577*jpg

change *, ** and 0 to dot, slash and o

It seems that the dates which both FOR and DIR find are the modified date which differs from Date Picture Taken in those pictures.
The real date is the Date Picture Taken.
Is there any way to find it?
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

http://uploads.screenshot-program.com/my.php?image=upl0336235577.jpg
msrox wrote:The real date is the Date Picture Taken.
Just to be shure that there is no config problem: TC and Explorer show the same date, do they?

If you mean the date stored in the Exif information inside the picture, I don't think this can be used directly in this way (unless someone knows a command line tool to extract the Exif date).
However, using a TC plugin like exif or shelldetails (I haven't tried them; discussed here) you can set the file date to the Exif date, when the picture was taken (in File -> Change Attributes).
Once these dates are equal, the date should be correctly displayed and also used by this tool.

Informations on using plugins can be found in the TCWiki.
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
msrox
Member
Member
Posts: 101
Joined: 2008-03-14, 00:10 UTC

Post by *msrox »

I appreciate your help.
Thank you very much, your help was great.

Would you please let me know if there is a web site or ebook or .. that I can find some useful commands like TC_Move2DateSubDir.cmd there.

Again thank you for the time you spent for me
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

Well, it consists of standard command line features existing since NT 4.0, the FOR command being the core (FOR /? gives infos on how to use it).
Most of the rest was team work of this forum (mostly in this german thread).

http://www.robvanderwoude.com contains a nice overview, tools and hints etc.
http://technet.microsoft.com/en-us/library/bb491071.aspx : "Command-line reference A-Z"
Searching Google for "batch for" should give some good examples, too.
AHK and AutoIT are nice alternative tools for automating things.
Again thank you for the time you spent for me
You're welcome, nice to know it works.
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
User avatar
Peter
Power Member
Power Member
Posts: 2064
Joined: 2003-11-13, 13:40 UTC
Location: Schweiz

Re: Folderize Files

Post by *Peter »

msrox wrote:I have 3000 pictures which have been taken in different dates.
I want to move them all to sub-folders with date label.
How can I do it?
Try it:
http://www.totalcmd.net/plugring/Mover.html

Peter
TC 10.xx / #266191
Win 10 x64
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

2Peter
Tested version 0.1:
  • [Edit]
    After searching this forum I found a comment of the author, telling that clicking "day" and "month" doesn't mean to include both,
    instead only one of these options at a time is allowed to be active.
    This way the result is OK.
    [/Edit]
  • "date" and "day" have the same accelerator key
  • only french messages are displayed (but english options)
    • after clicking "configure" button
      A propos de Mover: Fait très rapidement pour les besoins d'un utilisateur FR...
      automatic translation: (About Mover: Done very quickly to the needs of a user ... FR)
    • and in normal use
      Attention: Problème dans le choix/mois pour le tri, le module va utiliser l'année seulement
      automatic translation: (Attention: Problem in the choice / month for sorting, the module will use this year only)
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

Here is a reshacked and hexedited version, which corrects the accelerators and some other strings (no error messages, that's just too boring):
http://icfu.totalcmd.net/TC/Plugins/mover_0_1_[patched_by_Icfu].zip

Icfu
This account is for sale
User avatar
petermad
Power Member
Power Member
Posts: 14808
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Here is a reshacked and hexedited version
And unupxed I guess ;-) (don't hide your light under a bushel)
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

2icfu
Nice idea, thank you.
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
User avatar
petermad
Power Member
Power Member
Posts: 14808
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

I have made yet another version of the Mover plugin which can be downloaded at: http://www.totalcmd.net/plugring/mover-eng.html

1. The Tab-order in the dialog has been fixed.
2. Some of the most common error messages have ben translated from French.
3. The names of the two month and day checkboxes have been changed to something that I find more logical.
3. The order of the two month and day checkboxes have been switched to make the dialog more logical.

A Danisch version can also be found at: http://www.totalcmd.net/plugring/mover-dan.html
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Post Reply