Log in

View Full Version : Copy Files To Mobile Device Easily


Kris Kumar
06-30-2004, 11:00 PM
Do you transfer Music files or Photos to your mobile device frequently? Do you wish for an easier way to transfer the CAB files to the 'Start Menu\Accessories' folder? Do you copy documents or files to a specific folder on your mobile device? Do you perform one-way file sync, i.e. transfer files from your PC to device? If the answer to any of the above questions is true, you may want to read this Step By Step article.<br /> <br /><img src="http://www.smartphonethoughts.com/images/Copy2MobileSendTo-Res400.jpg" alt="User submitted image" title="User submitted image"/> <br /><br />When you are done reading this article, you will be able to setup the right click shortcut menu options on your PC. You can configure them according to your needs, set them up so that you can easily transfer files to the mobile device folders you access frequently. Once these right click shortcuts are in place, you will no longer have to Copy-Paste the files manually and also don't have to navigate through a maze of folders to get to the target folder, at least not for the frequently used folders.<br /><br />Let’s get started!<br /><!> <br />I have two methods, the first one is simple to setup, and the second one is a little tricky but adds context sensitivity. Let’s say you want the right click shortcut to show up only for .CAB files or for .MP3 files, then the second approach is the one that you need. The first one works well, but don't you want the computer to be smart enough to sense what you want to do :-) This article will focus on the first method. Stay tuned to SPT for another article on method 2, coming soon. :wink: <br /><br />The requirements for this solution are:<br />- Windows 2000/XP based desktop<br />- Windows Mobile Smartphone or Pocket PC <br />- Must be proficient with Notepad :-)<br />- <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=74473fd6-1dcc-47aa-ab28-6a2b006edfe9&amp;displaylang=en">WindowsMobilePowerToys.msi</a> must be installed<br /><br />The heart of this solution is CECopy a free utility provided by Microsoft in the Windows Mobile Power Toys. CECopy enables command prompt based copy of files from PC to device. In this article we will learn to utilize its functionality without getting into the command prompt or DOS hell.<br /><br />The only limitation I am aware of (and it may be a big one for you) is that you cannot select multiple files and copy them to the device. You will have to Right Click each individual file and copy it to the device one by one. Or copy the whole folder. <br /><br /><b>Method 1:</b><br /><br />This approach adds a Copy to Device shortcut to the 'Send To' menu.<br /><br />Once you have installed CECopy (it gets installed when <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=74473fd6-1dcc-47aa-ab28-6a2b006edfe9&amp;displaylang=en">WindowsMobilePowerToys.msi</a> is installed). Locate the CECopy.exe, and note its path. On my machine its path is <i>C:\Program Files\Windows Mobile Developer Power Toys\CECopy</i>. Depending on your system drive, the path or drive letter may vary. Check out the ReadMe.txt in the CECopy folder, if you want to learn more about the CECopy functionality.<br /><br />Next let’s launch the friendly editor, the Notepad. And add the following line.<br /><i><span style="color:red">"C:\Program Files\Windows Mobile Developer Power Toys\CECopy\CECopy.exe" %1 "dev:\</span><span style="color:green">&lt;devicefolderhere></span><span style="color:red">"</span></i><br /><br />Replace <i><span style="color:green">&lt;devicefolderhere></span></i> with the mobile device folder that you frequently write files to. e.g. If you want to copy CAB files then you may want to replace <i><span style="color:green">&lt;devicefolderhere></span></i> with <i>\IPSM\Windows\Start Menu\Accessories</i>. If you copy MP3 files then maybe you can replace it with <i>\Storage Card\Music</i>. Or for documents and other miscellaneous files - <i>\Storage Card\My Documents</i>.<br /><br />Following are the valid examples:<br />1.<br /><i>"C:\Program Files\Windows Mobile Developer Power Toys\CECopy\CECopy.exe" %1 "dev:\IPSM\Windows\Start Menu\Accessories"</i><br /><br />2.<br /><i>"C:\Program Files\Windows Mobile Developer Power Toys\CECopy\CECopy.exe" %1 "dev:\Storage Card\Music"</i><br /> <br />3.<br /><i>"C:\Program Files\Windows Mobile Developer Power Toys\CECopy\CECopy.exe" %1 "dev:\Storage Card\My Documents"</i><br /><br />Make sure that the path is valid. And do not forget to include the double quotes (") around the <i>CECopy.exe</i> path and the <i>dev:</i> path.<br /><br />Now save this file as a Batch (.BAT) file. Give it a descriptive name, like <i><span style="color:red">Copy 2 Mobile Device - </span><span style="color:green">&lt;shortfoldernamedescription></span></i>. The <i><span style="color:green">&lt;shortfoldernamedescription></span></i> can be <i>Music</i>, <i>My Documents</i>, or <i>Accessories</i> depending on the command being saved or performed in the file. So the following are valid examples of the file names:<br />Copy 2 Mobile Device - Music folder.bat<br />Copy to My Smartphone - Accessories folder.bat<br />Copy to My Documents on Mobile Device.bat<br /><br />Once the .BAT file is saved, create a Shortcut link for it by right clicking the .BAT file and then selecting 'Create Shortcut' option from the popup menu. You may want to edit the shortcut file name, so that the prefix 'Shortcut to' is removed. You may want to pretty it up, by assigning an icon to the shortcut file. Right click the shortcut, select 'Properties' and then select 'Change Icon'.<br /><br />Now its time to move the shortcut file from its current location to the following folder. <i><span style="color:red">C:\Documents and Settings\</span><span style="color:green">&lt;loggedInUserName></span><span style="color:red">\SendTo</span></i><br /><br />Depending on the way Windows is installed on your machine the drive letter may change. The <i><span style="color:green">&lt;loggedInUserName></span></i> is the Windows login name for whom the shortcut is to be created. In most cases it will be your login id.<br /><br />Copy the shortcut file to the above folder. And its time to test our little utility. Right click on any file and select the 'Send To' option from the popup menu. And you will see your shortcut in the list. Select it and you will see a command console window popup that will transfer the selected file to the target folder on the device.<br /><br /><br /><b>Method 2:</b><br /><br />I will have the method 2 published soon. Don't change the channel and keep watching this site. :-)

Mike Temporale
07-01-2004, 01:14 AM
Hey Kris, great tip. I've setup a couple different Send To links already. :D Looking forward to the next method.

Jason Dunn
07-01-2004, 04:51 AM
Very, very nice! 8)

Kris Kumar
07-01-2004, 07:30 PM
I didn't suggest the following in my article but I think I should have.

The method I have described can be used to create Send To shortcuts to regular folders and drives on your desktop. Lets say you have a CF/SD card reader, with drive letter X:. And you want to one-way-sync files to the Music folder on the card.

Instead of adding the following line in the .Bat file:
"C:\Program Files\Windows Mobile Developer Power Toys\CECopy\CECopy.exe" %1 "dev:\&lt;devicefolderhere>"

Add this one:
Copy %1 "&lt;desktopdriveandpath>"

The &lt;desktopdriveandpath> will read as X:\Music or whatever desktop path you want to specify.

Note: We replaced dev:\&lt;devicefolderhere> with &lt;desktopdriveandpath> and also CECopy with the plain old DOS Copy.

So now we have a solution, that can not only Copy Files To Your Mobile Device, but also to your frequently used Desktop drives and folders.

:-)

mscdex
07-07-2004, 01:00 PM
You can add a '@' (without the single quotes) in front of the

"D:\Program Files\Windows Mobile Developer Power Toys\CECopy\CECopy.exe" %1 ......

and it'll make the contents of the dos window that pops up a bit cleaner. (It won't display the entire command in the .bat file)

Just thought I'd throw that in :)

Kris Kumar
07-09-2004, 05:07 AM
Thanks mscdex, that's a good tip.

somainer
03-07-2007, 06:44 AM
The heart of this solution is CECopy a free utility provided by Microsoft in the Windows Mobile Power Toys. CECopy enables command prompt based copy of files from PC to device. In this article we will learn to utilize its functionality without getting into the command prompt or DOS hell.



Man, I wish I knew about this feature months ago... thanks for the tip.

Is there a similar PowerToy, or other freeware out there which would allow me to delete files on my phone, prior to copying new ones over?

mscdex
03-07-2007, 01:49 PM
You just revived a 3 year old thread :P

Kris Kumar
03-07-2007, 01:58 PM
You just revived a 3 year old thread :P

And brought back a reader who hasn't posted in a long while. ;-)

Welcome back mscdex and welcome to the site somainer.

somainer, sorry I dont think there is a delete utility. :-(

somainer
03-07-2007, 04:47 PM
You just revived a 3 year old thread :P

And brought back a reader who hasn't posted in a long while. ;-)

Welcome back mscdex and welcome to the site somainer.

somainer, sorry I dont think there is a delete utility. :-(

yeah, I guess that command line interfaces are so, you know, 3 years ago. :lol:

I have been a lurker in these forums since Sept when I got my first "smart"phone and have learned alot just by reading the posts by others. Recently I discovered the scripting tool MortSCript (http://mort.sto-helit.de/index.php?module=page&amp;entry=ms_overview&amp;action=view&amp;menu=29) at the SBSH forum while trying to figure out a way to automate syncing via bluetooth (see my post at this link (http://www.sbsh.net/forums/index.php?s=&amp;showtopic=15958&amp;view=findpost&amp;p=149067)). It got me thinking that there must be a scripting/command line way to tackle file transfer via bluetooth and ta-da, I learned here of cecopy. And it is working fabulously for the purpose of a weekly transfer of a large number of files that are updated and then re-written over others with the same name.

But now I am getting greedy and want an automatic way to daily sync to my phone via bluetooth a handful of podcasts I have historically loaded via USB and activeSTINK. cecopy will not work unless I figure out how to automate deletion as well - because the names of the files change each day -

Alternately, does anyone have suggestions for software that will sync files via bluetooth for a WM5 smartphone (Cingular 3125)? Is there a decent, reliable, and hopefully free piece of software out there to accomplish said task?

Thanks in advance for your suggestions!

mscdex
03-07-2007, 09:18 PM
You just revived a 3 year old thread :P

And brought back a reader who hasn't posted in a long while. ;-)

Welcome back mscdex and welcome to the site somainer.

somainer, sorry I dont think there is a delete utility. :-(

The only reason I knew about this was because evidentally I had set up a "notify me by mail when replies are made" for this thread. So when I got this out of the blue this morning I was confused to say the least :lol: