Open new directory with date

English support forum

Moderators: Stefan2, white, sheep, Hacker

Post Reply
matu89
Junior Member
Junior Member
Posts: 22
Joined: 2018-02-27, 18:54 UTC

Open new directory with date

Post by *matu89 » 2019-09-17, 18:58 UTC

When I creating a new directory within main directory with a date - it doesn't show me today date it show me the date of the directory I was with the cursor on it ...

How I open a directory with today current date ?

Thanks

vdijken
Junior Member
Junior Member
Posts: 72
Joined: 2016-07-30, 14:07 UTC
Location: The Netherlands

Re: Open new directory with date

Post by *vdijken » 2019-09-17, 19:49 UTC

I don't know how you manage this; but when I use F7 a directory with the current time and date is created.

User avatar
Hacker
Moderator
Moderator
Posts: 11272
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Open new directory with date

Post by *Hacker » 2019-09-17, 19:51 UTC

matu89,
F7, <[Y] [M] [D], Enter

HTH
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.

matu89
Junior Member
Junior Member
Posts: 22
Joined: 2018-02-27, 18:54 UTC

Re: Open new directory with date

Post by *matu89 » 2019-09-18, 05:16 UTC

Hacker wrote:
2019-09-17, 19:51 UTC
matu89,
F7, <[Y] [M] [D], Enter

HTH
Roman
its works , is there a way to add to the list the command : <[D] [M] [Y]? i know i can write in manually but if there is a automatic way it would be better.

thanks.

User avatar
petermad
Power Member
Power Member
Posts: 8488
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: Open new directory with date

Post by *petermad » 2019-09-18, 14:03 UTC

is there a way to add to the list the command : <[D] [M] [Y]?
Not as far as i know. But it should stay in the dropdown menu, until it is filled up.

You don't have to write: <[D] [M] [Y] unless you specifically want spaces between date, month and year - if you don't need spaces you can just write <[DMY]
License #524 (1994)
Danish Total Commander Translator
TC 9.22a 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 (1903) 64bit, 'Everything' 1.4.1.935 (x64)
TC 3.0b12 on Android 6.0
Get: Extended Total Commander Menus | PHSM-Calendar

User avatar
Stefan2
Power Member
Power Member
Posts: 2614
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Open new directory with date

Post by *Stefan2 » 2019-09-18, 14:21 UTC

matu89 wrote:
2019-09-18, 05:16 UTC
Hacker wrote:
2019-09-17, 19:51 UTC
matu89,
F7, <[Y] [M] [D], Enter

HTH
Roman
its works , is there a way to add to the list the command : <[D] [M] [Y]? i know i can write in manually but if there is a automatic way it would be better.

thanks.

If you need that often, you can also use a script to create a folder with current date
That script can be execute from a button or via user command by an keyboard shortcut.



 
Inofficial FAQs || WIKI (Deu/Eng) || TC Home (What's new? // FAQ // Download // Order // Addons // Tools // Plugins)
Erst wenn der letzte Baum gefällt oder die letzte Biene verendet ist, werden die Leute verstehen warum Umweltschutz wichtig ist.

matu89
Junior Member
Junior Member
Posts: 22
Joined: 2018-02-27, 18:54 UTC

Re: Open new directory with date

Post by *matu89 » 2019-09-18, 18:13 UTC

Stefan2 wrote:
2019-09-18, 14:21 UTC
matu89 wrote:
2019-09-18, 05:16 UTC
Hacker wrote:
2019-09-17, 19:51 UTC
matu89,
F7, <[Y] [M] [D], Enter

HTH
Roman
its works , is there a way to add to the list the command : <[D] [M] [Y]? i know i can write in manually but if there is a automatic way it would be better.

thanks.

If you need that often, you can also use a script to create a folder with current date
That script can be execute from a button or via user command by an keyboard shortcut.



 
You can guide me through it?
What code I need to write to make a button?

User avatar
Stefan2
Power Member
Power Member
Posts: 2614
Joined: 2007-09-13, 22:20 UTC
Location: Europa

PowerShell: Create new directory with current date as name

Post by *Stefan2 » 2019-09-18, 18:36 UTC

matu89 wrote:
2019-09-18, 18:13 UTC
Stefan2 wrote:
2019-09-18, 14:21 UTC
...

If you need that often, you can also use a script to create a folder with current date
That script can be execute from a button or via user command by an keyboard shortcut.
 

You can guide me through it?
What code I need to write to make a button?


Try this button:

Code: Select all

TOTALCMD#BAR#DATA
PowerShell
New-Item -ItemType Directory -Path """.\$((Get-Date).ToString('yyyy-MM-dd'))"""
PowerShell
PowerShell MD "YMD"

1
-1
(Copy this button-exchange-code and paste it to your TC buttonbar)



To create an button yourself:

Code: Select all

Command: PowerShell
Parameters: New-Item -ItemType Directory -Path """.\$((Get-Date).ToString('yyyy-MM-dd'))"""
Start path:
Icon file: PowerShell
ToolTip: PowerShell MD "YMD"
Program window: [X]Run minimized / [_]Run maximized 


HTH? :D




Shorter version would be (but less understandable):
New-Item -Item Dir ".\$((Get-Date).ToString('yyyy-MM-dd'))"

The triplet """quotes""" are needed for use in an TC button.



 
Inofficial FAQs || WIKI (Deu/Eng) || TC Home (What's new? // FAQ // Download // Order // Addons // Tools // Plugins)
Erst wenn der letzte Baum gefällt oder die letzte Biene verendet ist, werden die Leute verstehen warum Umweltschutz wichtig ist.

matu89
Junior Member
Junior Member
Posts: 22
Joined: 2018-02-27, 18:54 UTC

Re: Open new directory with date

Post by *matu89 » 2019-09-19, 15:45 UTC

thanks!

Post Reply