Results 1 to 6 of 6
  1. #1
    Star Lounger
    Join Date
    Feb 2003
    Location
    near Blairgowrie, Perthshire, Scotland
    Posts
    72
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Command prompt and Desktop

    Is it possible to save a file from the Command prompt to the Desktop? Or do they live in different worlds?

  2. #2
    Platinum Lounger
    Join Date
    Jan 2001
    Location
    Quedgeley, Gloucester, England
    Posts
    5,333
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Command prompt and Desktop

    In that
    "the desktop"
    is the folder
    "Cocuments and Settings<userid>Desktop"
    the answer has to be "Yes, if a bit tortuously..."!

    It will depend somewhat on what you mean by Save!

    John
    <font face="Script MT Bold"><font color=blue><big><big>John</big></big></font color=blue></font face=script>

    Ita, esto, quidcumque...

  3. #3
    Plutonium Lounger
    Join Date
    Oct 2001
    Location
    Lexington, Kentucky, USA
    Posts
    12,107
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Command prompt and Desktop

    As John said, a bit of a pain but here's one little example starting from CMD and initially using the long name. Note that the command processor shortened the folder name after I opened the edit command and typed something in the text file and SAVED it with the edit command. (Obviously you can't see what the screen showed when I was inside the edit window.)

  4. #4
    Star Lounger
    Join Date
    Feb 2003
    Location
    near Blairgowrie, Perthshire, Scotland
    Posts
    72
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Command prompt and Desktop

    Thanks, both. I thought it might be buried somewhere! I'll tinker around with environment variables and a batch file to see if I can jump straight to it.

    Rex Last

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Command prompt and Desktop

    On my Windows XP, the UserProfile environment variable contains Cocuments and SettingsHansV, so my desktop folder is

    %UserProfile%Desktop

    Warning: the name of the desktop folder is language-dependent, so it will be different on for example a French language version of Windows.

  6. #6
    Plutonium Lounger
    Join Date
    Oct 2001
    Location
    Lexington, Kentucky, USA
    Posts
    12,107
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Command prompt and Desktop

    Good points, Hans. That's one I didn't think to check. One should note that on MINE, the userprofile variable contains the "short name" of the documents and settings folder, but there's also a variable called homepath that has the full folder name but without the drive letter designation. Whatever the case, it should be something he can deal with.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •