Open new directory with date

English support forum

Moderators: white, Hacker, petermad, Stefan2

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

Open new directory with date

Post by *matu89 »

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
User avatar
vdijken
Member
Member
Posts: 181
Joined: 2016-07-30, 14:07 UTC
Location: The Netherlands

Re: Open new directory with date

Post by *vdijken »

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: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Open new directory with date

Post by *Hacker »

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: 23
Joined: 2018-02-27, 18:54 UTC

Re: Open new directory with date

Post by *matu89 »

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: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Open new directory with date

Post by *petermad »

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 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Stefan2
Power Member
Power Member
Posts: 4133
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Open new directory with date

Post by *Stefan2 »

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.



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

Re: Open new directory with date

Post by *matu89 »

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: 4133
Joined: 2007-09-13, 22:20 UTC
Location: Europa

PowerShell: Create new directory with current date as name

Post by *Stefan2 »

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.



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

Re: Open new directory with date

Post by *matu89 »

thanks!
Post Reply