Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create files from cmder. #417

Closed
denkurbatov opened this issue Feb 28, 2015 · 6 comments
Closed

Create files from cmder. #417

denkurbatov opened this issue Feb 28, 2015 · 6 comments

Comments

@denkurbatov
Copy link

Can anyone help me, how can i create files from cmder? I want something like in Ubuntu terminal "toucn style.css" .
Thank you, anywhere.

@Jackbennett
Copy link
Contributor

If you've in powershell new-item -type file exampleName.
In cmd type NUL > file.txt.

I think in the dev build you can make an alias with spaces in so in the next release you can do alias touch="type NUL > %1"

@Jackbennett
Copy link
Contributor

And if you are using powershell, put this in you file at $profile

function touch{
    Param(
        [Parameter(Mandatory=$true)]
        [string]$name
    )
    if(-not (test-path $name)){
        new-item -type file $name -force
    } else {
        Write-Warning "$name exists"
    }
}

We're working on making things like this much nicer.

@RyannosaurusRex
Copy link

Just using regular touch test.txt actually works for me and creates an empty file. Is that what you're wanting?

@denkurbatov
Copy link
Author

Hmm. Now it works for me too) Something strange )

@SOSANA
Copy link

SOSANA commented Jun 17, 2016

Hey all,

I recently did an update and touch option to create new file doesn't work anymore....anyone else having this issue?

@ayoubaarchi
Copy link

npm install touch-cli -g

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants