PDA

View Full Version : i need to code the source file to another folder


lnd
04-24-2008, 12:47 PM
i need to copy the source file to another folder
the code

Folder.Create(_ProgramFilesFolder .. "\\HOTBUT");
File.Copy(_SourceFolder .. "\\" .. _SourceFilename, _ProgramFilesFolder .. "\\HOTBUT\\", true, true, false, true, nil);

it is not good way???

mwreyf1
04-24-2008, 01:11 PM
Try this:
_ProgramFilesFolder .. "\\HOTBUT"

instead of:
_ProgramFilesFolder .. "\\HOTBUT\\"

On File.Copy line.

lnd
04-24-2008, 11:16 PM
it's dont work

yhb
04-25-2008, 02:06 AM
I'm not good at this but you can try it. It works for me.. :)

Folder.Create(_ProgramFilesFolder .. "\\HOTBUT");
File.Copy(_SourceFolder .. "\\" .. "*.*", _ProgramFilesFolder .. "\\HOTBUT\\", true, true, false, true, nil);


yhb

nals
04-25-2008, 02:09 AM
yhb
It works for me too ;)

mwreyf1
04-25-2008, 08:10 AM
That's strange.

This does work for me.

Folder.Create(_ProgramFilesFolder .. "\\HOTBUT");
File.Copy(_SourceFolder .. "\\" .. _SourceFilename, _ProgramFilesFolder .. "\\HOTBUT", true, true, false, true, nil);

yhb
04-25-2008, 10:39 AM
That's strange.

This does work for me.

Folder.Create(_ProgramFilesFolder .. "\\HOTBUT");
File.Copy(_SourceFolder .. "\\" .. _SourceFilename, _ProgramFilesFolder .. "\\HOTBUT", true, true, false, true, nil);


Yes that does work but I think he wants all folders and files and subfolders from SourceFolder....that only copies files from the SourceFolder and not the folders. :)

yhb