Page 1 of 1

Copy Folder

PostPosted: Tue Feb 28, 2017 11:32 pm
by StarterPack
Hi guys, how do i Copy a Folder. I want to make a backup of my Folder with everything in it to Ext hdd.
"FileCopy" can backup 1 file at a time, but I want to Copy the complete Folder.
Thank You

Re: Copy Folder

PostPosted: Wed Mar 01, 2017 6:44 am
by Gaev
StarterPack:

If your Folder contains other folders, best to use the power of the DOS xcopy command (with the /s option).

Otherwise, you can use FileList to extract a list of the files, then StrParse the contents of the variable to create an arrayed variable (one item per file) and finally run a Loop/EndLoop code block to invoke a FileCopy of each array item. Ask here if you need help with any of the steps.

Re: Copy Folder

PostPosted: Wed Mar 01, 2017 10:18 am
by StarterPack
Thank you Gaev, I'll give it a try and if i'm struggling with it I will ask you.
Thank You

Re: Copy Folder

PostPosted: Wed Mar 01, 2017 2:08 pm
by mishem
If will further work with files and folders, you can use the plugin NeoBookFM/FTP.

Re: Copy Folder

PostPosted: Wed Mar 01, 2017 3:13 pm
by Gaev
Thanks mishem ... I keep forgetting about the excellent plugin from Dave the master.

Re: Copy Folder

PostPosted: Thu Mar 09, 2017 4:04 pm
by StarterPack
Thank you Gaev, I manage to get it right with the loop function. Works perfectly

If your Folder contains other folders, best to use the power of the DOS xcopy command (with the /s option)

I would love to learn more about the DOS xcopy command though, but don't know how it works

Re: Copy Folder

PostPosted: Thu Mar 09, 2017 6:58 pm
by Gaev
StarterPack:

I would love to learn more about the DOS xcopy command though, but don't know how it works

You can invoke xcopy using NeoBook's Run command.

For details of syntax, check out this web page from Microsoft ... http://www.computerhope.com/xcopyhlp.htm

As with any DOS command, you can redirect the output (produced by the command) to a file by appending > somefile.txt to the command.

Re: Copy Folder

PostPosted: Thu Mar 09, 2017 10:26 pm
by StarterPack
Thank You Gaev, I think this is a great start for me

Re: Copy Folder

PostPosted: Mon Mar 20, 2017 2:09 pm
by dpayer
StarterPack wrote:Hi guys, how do i Copy a Folder. I want to make a backup of my Folder with everything in it to Ext hdd.
"FileCopy" can backup 1 file at a time, but I want to Copy the complete Folder.
Thank You



Take a look at this project of mine:

http://neosoftwarecom.ipower.com/commun ... 4cf2b3ee18

It was created as a barebones alternative to the windows file explorer. It has many file/folder functions written as NB functions.

Use what may be handy from it. The coding should be straightforward and is annotated.

David