KasunL's Profile User Rating: -----

Reputation: 1 Apprentice
Active Members
Active Posts:
81 (0.05 per day)
11-April 11
Profile Views:
Last Active:
User is offline Feb 25 2015 08:11 PM

Previous Fields

OS Preference:
Who Cares
Favorite Browser:
Favorite Processor:
Who Cares
Favorite Gaming Platform:
Who Cares
Your Car:
Who Cares
Dream Kudos:

Latest Visitors

Icon   KasunL has not set their status

Posts I've Made

  1. In Topic: Adding an extra item to the file right-click menu.

    Posted 25 Feb 2015

  2. In Topic: Adding an extra item to the file right-click menu.

    Posted 25 Feb 2015

    The program is not for someone else, it's just for me to send my files to whatever destination i want. It's not big project, just file copy. i have done it many times earlier, since my c++ time. This is the first time i got a bug with it. And i think iterating is the cause for the other thread code's bug. my original intentions was to create this single file copy app, but i diverted to the other program to TEST the folder copying.

    If someone can please point out how to add a new item to file R-C menu, i'll manage the code myself. Appreciated.
  3. In Topic: Adding an extra item to the file right-click menu.

    Posted 25 Feb 2015

    Thanks for that tlhIn. But my other thread is for a test program -- to copy a directory and all it's files to somewhere else, by extending the folder R-C menu. But i actually need is to copy just one file to another place in hd. Coz, i have these snap files in a folder, and i just need to select only the files i need to copy, not the whole dir. also I think it will be easier than iterating through the dir, finding files and copy each, thus causing my bug in the other thread. The two codes will not conflict. This is for another prog.
  4. In Topic: file.copy() seems not working O.o

    Posted 25 Feb 2015

    View PostSkydiver, on 25 February 2015 - 10:59 PM, said:

    ??? What class are you using. Both variants FileInfo.CopyTo() take only one path -- the destination.

    File.Copy() on the other hand takes two parameters: source and destination. If you are passing the source path for both parameters, then the exception is expected.

    Here's a silly question, you may not have a file with a conflicting name at the destination, but do you have a conflicting directory name? Also have you checked to see if you have any hidden or system files in the destination with a conflicting name? (By default Windows Explorer does not show hidden or system files and you'll have to flip a switch to make those visible.)

    sorry, i did a mistake in above wordings. yes the copy() takes 1 arg. what i meant was when i create the dest dir path with 'selectedPath' and 'temppath' and pass it to copy(), it restores to the source file gain, not the destination i give it O.o. Really confused about that.
    No, i don't think there's a hidden file with that name. The name is just "new text file.txt" -- there's no hidden file with that name is there?. PLUS, the destination folder is empty -- no files to conflict with. and i delete it every time i test the prog. So the program creates the empty folder.

  5. In Topic: file.copy() seems not working O.o

    Posted 25 Feb 2015

    View PosttlhIn`toq, on 25 February 2015 - 06:21 PM, said:

    Have you tried checking if it exists programmatically?

    If (!File.Exists(tempFile)) File.CopyTo(tempFile);

    That way it doesn't try to overwrite and it it won't throw an error if it truly does exist.

    If nothing is copied that will prove your source and destination paths are NOT what you think they are.

    Yes tlhIn, the problem IS that CopyTo() takes both paths as source paths. Coz the exception says " "\file.txt" already exists". But the variables im using ( tempfile and destination.SelectedPath) are actually getting the correct paths. i donno wts happening!

My Information

Member Title:
D.I.C Head
Age Unknown
Birthday Unknown

Contact Information



KasunL hasn't added any friends yet.


Page 1 of 1
  1. Photo

    ubunta Icon

    30 Sep 2012 - 23:31
    hello how you are????????????????
Page 1 of 1