Zdravím,
vedel by niekto pomôcť s vytvorením skriptu pre plugin Automatizácia, ktorý vybraným súborom zmení dátum na včera?
Vďaka.
Automatizácia: skript pre posun dátumu o 1 deň vzad
Re: Automatizácia: skript pre posun dátumu o 1 deň vzad
Aside from the "Automation" part (& the translation part)...
https://forum-altap-cz.translate.goog/v ... app#p72168
Nirsoft: BulkFileChanger
BulkFileChanger has a GUI, by default, but can also be run from a command-line (no GUI at all), & that happens with the /ChangeTimeAttrSingle command-line switch (& others).
You can create a batch file, something like:
BACKDATE1DAY.bat:
where %1 is the file you want to change the date of.
The key part is to have a (BFC) .cfg file set up correctly.
The pertinent parts of this .cfg file are:
That says to subtract 1 day (from a files date modified day).
(You could also set date created... similarly, but I'll suppose you're only/mainly interested in date modified.)
This is an entire .cfg file that should work (& you'll need a full .cfg for it to work).
BulkFileChanger.cfg:
Test it out.
Copy BulkFileChanger.exe & (the above) BulkFileChanger.cfg into a directory.
Create a file, call it "X".
From a command line, run the command:
Check X's date.
You should see it is now one day earlier.
(Oh, & as written, the .cfg, it sets the file time to 12:01:00 AM, but I suppose that too could be changed?)
Run the same command again. Observe the date.
Run the same command again. Observe the date. ...
Each time you run it, it should become 1 day earlier.
(Also note that it properly goes from the first of the month to the last day of the prior month.
So 09-01-2022 becomes 08-31-2022.)
https://forum-altap-cz.translate.goog/v ... app#p72168
Nirsoft: BulkFileChanger
BulkFileChanger has a GUI, by default, but can also be run from a command-line (no GUI at all), & that happens with the /ChangeTimeAttrSingle command-line switch (& others).
You can create a batch file, something like:
BACKDATE1DAY.bat:
Code: Select all
BulkFileChanger.exe /ChangeTimeAttrSingle %1
The key part is to have a (BFC) .cfg file set up correctly.
The pertinent parts of this .cfg file are:
Code: Select all
ChangeTime.Modified.AddValue=-1
ChangeTime.Modified.AddUnit=4
(You could also set date created... similarly, but I'll suppose you're only/mainly interested in date modified.)
This is an entire .cfg file that should work (& you'll need a full .cfg for it to work).
BulkFileChanger.cfg:
Code: Select all
[General]
ShowGridLines=0
SaveFilterIndex=0
ShowInfoTip=1
ShowTimeInGMT=0
MarkOddEvenRows=0
AddWildCard.SubfolderDepth=0
AddWildCard.Wildcard=
AddFiles=1
AddFolders=1
ExecuteOptions.ShowWindow=1
ExecuteOptions.ExecuteCommand=
ChangeTime.Created.UseTime=0
ChangeTime.Created.UseDate=0
ChangeTime.Created.Add=0
ChangeTime.Created.AddValue=5
ChangeTime.Created.AddUnit=3
ChangeTime.Created.DateTime=
ChangeTime.Modified.UseTime=0
ChangeTime.Modified.UseDate=0
ChangeTime.Modified.Add=1
ChangeTime.Modified.AddValue=-1
ChangeTime.Modified.AddUnit=4
ChangeTime.Modified.DateTime=
ChangeTime.Accessed.UseTime=0
ChangeTime.Accessed.UseDate=0
ChangeTime.Accessed.Add=0
ChangeTime.Accessed.AddValue=5
ChangeTime.Accessed.AddUnit=3
ChangeTime.Accessed.DateTime=
ChangeTime.StoredInFile.UseTime=0
ChangeTime.StoredInFile.UseDate=0
ChangeTime.StoredInFile.Add=0
ChangeTime.StoredInFile.AddValue=5
ChangeTime.StoredInFile.AddUnit=3
ChangeTime.StoredInFile.DateTime=
ChangeTime.CopyTimeFrom=1
ChangeTime.CopyTimeToCreated=1
ChangeTime.CopyTimeToModified=0
ChangeTime.CopyTimeToAccessed=1
ChangeTime.CopyToStoredInFile=0
ChangeTime.StoredInFileMode=0
ChangeTime._UseCopyTime=0
ChangeTime._TimeInGMT=1
ChangeAttr.Archive=1
ChangeAttr.Hidden=1
ChangeAttr.ReadOnly=1
ChangeAttr.System=1
ChangeAttr.Temporary=1
ChangeTime.TimeSequenceMode=0
WinPos=2C 00 00 00 00 00 00 00 01 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 58 00 00 00 58 00 00 00 D8 02 00 00 38 02 00 00
Columns=96 00 00 00 FA 00 01 00 6E 00 02 00 6E 00 03 00 6E 00 04 00 64 00 05 00 5A 00 06 00 5A 00 07 00 C8 00 08 00 78 00 09 00
Sort=0
Test it out.
Copy BulkFileChanger.exe & (the above) BulkFileChanger.cfg into a directory.
Create a file, call it "X".
From a command line, run the command:
Code: Select all
BulkFileChanger.exe /ChangeTimeAttrSingle X
You should see it is now one day earlier.
(Oh, & as written, the .cfg, it sets the file time to 12:01:00 AM, but I suppose that too could be changed?)
Run the same command again. Observe the date.
Run the same command again. Observe the date. ...
Each time you run it, it should become 1 day earlier.
(Also note that it properly goes from the first of the month to the last day of the prior month.
So 09-01-2022 becomes 08-31-2022.)
WinXP Pro SP3 or Win7 x86 | SS 2.54