header1   header
header
header Register : : Login header
header
connector   connector
menuleft menuright
submenu   submenu
left
How to get .Direcory of $args?
Last Post 15 Aug 2010 08:06 AM by absolutebeginner. 1 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
absolutebeginnerUser is Offline
New Member
New Member
Posts:14
Avatar

--
15 Aug 2010 08:02 AM
    Hello,

    I do have some scripts that I access through links in Windows-Explorers SendTo context menu. For example one of them is "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -noexit sha1" which is a link to a script that calculates the SHA-1 of the file I right-clicked on. The path of the file gets passed to the script as $args.

    Now I make a script for which I need to get the Directory of that $args ($args.Directory) but unfortunately this isn't possible. Powershell doesn't even show an error. Simply nothing happens.

    How could I achive this?

    Thanks!
    absolutebeginnerUser is Offline
    New Member
    New Member
    Posts:14
    Avatar

    --
    15 Aug 2010 08:06 AM
    BTW, this forum flattens my postings. The returns get omitted. Do I have to insert
    ?

    EDIT: Aha!
    You are not authorized to post a reply.


    Active Forums 4.3
    right
    footer   footer
    footer Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2 footer
    footer   footer