I know I can create a .txt file on the desktop by using

copy nul > file.txt

but I want to create it on a specific spot on the desktop. Is there any way to do this?

  • by "specific spot", you mean positioning the icon in a specific corner of the screen or something? (the desktop is already a specific folder for that user)
    – LevenTech
    May 31, 2017 at 20:40

2 Answers 2


Add a path to the output side of the >

copy nul > C:\Users\Profile\Desktop\Folder\file.txt

If there are spaces put quotes around the destination.

  • I think you got me wrong. :D I want to create it for example in the middle of the desktop. May 31, 2017 at 20:15
  • Oh like a specific X/Y layout spot?
    – Sorean
    May 31, 2017 at 20:37

This StackOverflow question is probably what you need. It talks about programmatically changing the position of icons on the desktop.

Unfortunately it sounds complicated. You probably won't be able to do it with a simple command like you're starting with.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .