Question: What is the difference between the 2 lines below? They do the same thing so is there any difference ?

```
string filename = System.IO.Path.GetFileName(FileUpload1.PostedFile.FileName);
string filename = FileUpload1.PostedFile.FileName;

```

Answer: 
In BASH you can use this utility function:

```
decodeURL() {
   printf "$(sed 's#^file://##;s/+/ /g;s/%\(..\)/\\x\1/g;' <<< "$@")\n";
}

```

**Then call this function as:**

```
decodeURL 'file:///home/sashoalm/Has%20Spaces.txt'
/home/sashoalm/Has Spaces.txt

```
Perl to the rescue:

```
echo file:///home/sashoalm/Has%20Spaces.txt |\
  perl -MURI -MURI::Escape -lne \
      'print uri_unescape(URI->new($_)->path)'

```

See [URI](http://p3rl.org/URI) and [URI::Escape](http://p3rl.org/URI::Escape).