[APP] xcopyce - 0v04 [08 SEP 2008]

Search This thread

DaveShaw

Senior Moderator Emeritus
Dec 4, 2007
8,772
522
Huddersfield
www.taeguk.co.uk
Hi
This app was created a few months ago and lived in the UC thread created by Sleuth255. I said if there was enough interest I would move the post to the it's own thread. I got to 0v03, so I started a new thread.

xcopyce v0-04
This is an application idea l3v5y came up with and somehow convinced me into writing :p.

Purpose
To copy folders as part of the UC process.

Requirements
* .Net CF 2.0
* UC (Of course).

Usage
*Download the Zip file and extract xcopyce.exe onto your the root of your storage card.
*Add the following lines to your UC File
Code:
CPY1:\Storage Card\xcopyce.exe
CPY2:\Temp\xcopyce.exe
EXEC:\Temp\xcopyce.exe
Replace folder paths where necessary, remeber that EXEC: does not support spaces (hence why I'm copying to \Temp).

Config
Create a file on the root of your storage card called xcopyce.txt - this is the config file.
*The format of the file is "source" "destination" attribs.
*Comments begin with a # symbol.
*By default destination files are created without attributes.
*File attributes are as follows (case insensitive):
Code:
r - read-only
a - archive
s - system
h - hidden
Example:
Code:
[COLOR="DarkGreen"]#Copy Temp from Storage Card to your Device[/COLOR]
"\Storage Card\Temp" \Temp
[COLOR="DarkGreen"]#Copy Folder making all files Read only in the Destination[/COLOR]
\Temp "\Temp2" r
[COLOR="DarkGreen"]#Copy Folder making all files Hidden and System in the Destination[/COLOR]
\Temp2 \Temp3 sh
[COLOR="DarkGreen"]#Copy Folder making all files System, hidden, read-only and archive in the Destination[/COLOR]
\Temp3 \Temp4 shra
Double Quotes can surround either the source or destination, but must surround paths with spaces in. This is the same as when using the xcopy command line. If in doubt surround both sides with quotes. :)

Logging
A log file is created on the root of your storage card called xcopyce.log. This file is over written every time you run.

Change Log
0v01
- Initial Development.
0v02
- No longer requires the storage card to be called "\Storage Card".
0v03
- Support for destination file attribute setting.
- Now over writes read-only files in the destination.
- Changes to log file structure.
- Handles blank lines in the config file.
0v04
- Bug fix: Line parser algorithm should handle work in all cases. (#10)

Credits
l3v5y for the idea.
Sleuth255 for his UC work in the first place.
nikagl for inspiring more updates.

Download
Here

MD5 Hash
Code:
9E08A46EC3E049FF71BFF476FE818BD4

Thanks
Dave
 
Last edited:

nikagl

Senior Member
Jun 11, 2006
2,878
619
51
Nieuwegein, NL
OnePlus 6
Thanks Dave! And now let's add some tags for the search engines which I had initially used to find this wonderful program, but did not (I only accidentaly stumbled accross it because you had the link in your sig!):

This tool is the perfect addition to Sashimi and/or UC / User Customization as it can be executed using a Command Line on any Windows Mobile (WM5 or WM6) device to copy files and overwrite read only files! :D

Regards,

Nika.
 

l3v5y

Retired Senior Moderator
Sep 13, 2007
7,485
44
32
Bristol
Me likey file attributes!

Now I'm going to have to flash a ROM to try it out!

One question though... Can this copy files as well as folders?

BTW, I added this to the UC post.
 

nikagl

Senior Member
Jun 11, 2006
2,878
619
51
Nieuwegein, NL
OnePlus 6
Hi Dave,

I guess for compatibility with UC you've created the current tool, where it uses a file to perform the copy tasks. Would it be possible to create a 100% command line method, like xcopy in Windows?

For instance here's the usage of xcopyce I'd love to see (straight from xcopy /? ;)):

XCOPYCE source [destination] [/A | /M] [/D[:date]] [/P] [/S [/E]] [/V] [/W] [/C] [/i] [/Q] [/F] [/L] [/G] [/H] [/R] [/T] [/u] [/K] [/N] [/O] [/X] [/Y] [/-Y] [/Z] [/EXCLUDE:file1[+file2][+file3]...]

source: Specifies the file(s) to copy.
destination: Specifies the location and/or name of new files.
/A = Copies only files with the archive attribute set, doesn't change the attribute.
/M = Copies only files with the archive attribute set, turns off the archive attribute.
/D:m-d-y = Copies files changed on or after the specified date. If no date is given, copies only those files whose source time is newer than the destination time.
/EXCLUDE:file1[+file2][+file3]... = Specifies a list of files containing strings. Each string should be in a separate line in the files. When any of the strings match any part of the absolute path of the file to be copied, that file will be excluded from being copied. For example, specifying a string like \obj\ or .obj will exclude all files underneath the directory obj or all files with the .obj extension respectively.
/P = Prompts you before creating each destination file.
/S = Copies directories and subdirectories except empty ones.
/E = Copies directories and subdirectories, including empty ones. Same as /S /E. May be used to modify /T.
/V = Verifies each new file.
/W = Prompts you to press a key before copying.
/C = Continues copying even if errors occur.
/I = If destination does not exist and copying more than one file, assumes that destination must be a directory.
/Q = Does not display file names while copying.
/F = Displays full source and destination file names while copying.
/L = Displays files that would be copied.
/G = Allows the copying of encrypted files to destination that does not support encryption.
/H = Copies hidden and system files also.
/R = Overwrites read-only files.
/T = Creates directory structure, but does not copy files. Does not include empty directories or subdirectories. /T /E includes empty directories and subdirectories.
/U = Copies only files that already exist in destination.
/K = Copies attributes. Normal Xcopy will reset read-only attributes.
/N = Copies using the generated short names.
/O = Copies file ownership and ACL information.
/X = Copies file audit settings (implies /O).
/Y = Suppresses prompting to confirm you want to overwrite an existing destination file.
/Z = Copies networked files in restartable mode.

Regards,

Nika.
 

DaveShaw

Senior Moderator Emeritus
Dec 4, 2007
8,772
522
Huddersfield
www.taeguk.co.uk
Hi Dave,

I guess for compatibility with UC you've created the current tool, where it uses a file to perform the copy tasks. Would it be possible to create a 100% command line method, like xcopy in Windows?

For instance here's the usage of xcopyce I'd love to see (straight from xcopy /? ;)):

...snip...

Regards,

Nika.

If I ever get enough free time I might do... :D

Ta
Dave
 

DaveShaw

Senior Moderator Emeritus
Dec 4, 2007
8,772
522
Huddersfield
www.taeguk.co.uk
It's working well! :)

But, I must disagree with

I did not "con" you into doing it. You chose to do it. :p

Lighten up :)

DaveShaw said:
Just for the record I was not conned, hoodwinked, tricked or in any way forced against my will by l3v5y to create this program.
Hows that suit you ? :p

Only kidding, I'll expand the word conned into convinced.

Ta
Dave
 

TheBeO

Senior Member
Mar 12, 2006
95
16
Error in parser ?

Hi,

first of all, thanks for this apps !

I've found an error : I'm using this line :

"\Carte de Stockage\@Backup\Apps\Application Data" "\Application Data"

and it doesn't work as it must do. I looked at the log file, and found that it try :

source: \Carte de Stockage\@Backup\Apps\Application Data ---- ok
dest: \Application
attribs: Data

so even with double quotes, the parser find a space, and so choose last chars (in my case the end of path) as attribs.

I made a few tests, always bad :
"\Carte de Stockage\@Backup\Apps\Application Data" "\Application Data" r ---> attribs are Data "r
without quotes
...

Can you fix it please?

Thanks
 

DaveShaw

Senior Moderator Emeritus
Dec 4, 2007
8,772
522
Huddersfield
www.taeguk.co.uk
Hi,

first of all, thanks for this apps !

I've found an error : I'm using this line :

"\Carte de Stockage\@Backup\Apps\Application Data" "\Application Data"

and it doesn't work as it must do. I looked at the log file, and found that it try :

source: \Carte de Stockage\@Backup\Apps\Application Data ---- ok
dest: \Application
attribs: Data

so even with double quotes, the parser find a space, and so choose last chars (in my case the end of path) as attribs.

I made a few tests, always bad :
"\Carte de Stockage\@Backup\Apps\Application Data" "\Application Data" r ---> attribs are Data "r
without quotes
...

Can you fix it please?

Thanks

Doh!

I'll make a fix by then end of play tomorrow, providing I can re-create this first time. :)

Dave
 

theme freak

Senior Member
Nov 10, 2007
376
0
Woah I really envy you all programmers :) I dun understand at all what you all are talking about but it seems nice for people who understand it :D
 

JohnBecker

Member
Dec 13, 2007
27
4
Wow... I like it. I just tried it with my Diamond and it works great on entire folders. My question is:

I have a folder of ringtones on my storage card. I want to copy those to the \windows\rings folder, but it didn't seem to do it. It didn't overwrite any files in a folder that already existed.
I also want to copy the PIM.VOL from my backup to the root of the device. It also didn't work. Any suggestions?

EDIT: it's my turn to go DOH!

I think I found my error. I read the log and found I had mistyped the path. I also read back through the posts and found it can't do just a single file, only a directory. That's why the PIM.VOL file didn't get copied.
 
Last edited:

DaveShaw

Senior Moderator Emeritus
Dec 4, 2007
8,772
522
Huddersfield
www.taeguk.co.uk
Wow... I like it. I just tried it with my Diamond and it works great on entire folders. My question is:

I have a folder of ringtones on my storage card. I want to copy those to the \windows\rings folder, but it didn't seem to do it. It didn't overwrite any files in a folder that already existed.
I also want to copy the PIM.VOL from my backup to the root of the device. It also didn't work. Any suggestions?

EDIT: it's my turn to go DOH!

I think I found my error. I read the log and found I had mistyped the path. I also read back through the posts and found it can't do just a single file, only a directory. That's why the PIM.VOL file didn't get copied.

Yeah for single file's just use UC.

And for the \Rings, if it's cooked into the ROM you might not be able to overwrite the file. Nothng I can do about that :p

Ta
Dave
 

m00moo

Senior Member
Jul 19, 2008
1,033
75
sorry guys but i dont really get this lil app much. theres not much to it and no info about how to use it? no real examples and explanations to what it does or how.

So could somebody break it down?
 

DaveShaw

Senior Moderator Emeritus
Dec 4, 2007
8,772
522
Huddersfield
www.taeguk.co.uk
sorry guys but i dont really get this lil app much. theres not much to it and no info about how to use it? no real examples and explanations to what it does or how.

So could somebody break it down?

I wrote it because when you are using Slueth's UC you can only copy files using the CPY1 and CPY2 commands.
This application allows you to copy folders as part of the UC process.

To use...
You create a config file on your card, with the source and destination folders (and any attributes you want) - See post #1.
Then you just execute the xcopyce exe in your UC SDConfig.txt file. (You must copy it to a location on your phone becase the UC EXEC: command cannot cope with spaces :) ) - The line to add to SDConfig.txt is in Post #1.

Ta
Dave
 

m00moo

Senior Member
Jul 19, 2008
1,033
75
sorry i think i understand now.

just that upon first inspection of the atributes they seemed to be clumped up and i believed that was the whole code.

thanks for the cool handy app!