Thursday, February 18, 2016

Copy files without permissions, Robocopy cmd line or Richcopy GUI for Windows

Need to back-up laptop and desktop drives without file permissions getting in the way? 
1) Command Line - GUI tool see below
 

Use RoboCopy (Robust File Copy) a command-line file copying tool built into Windows. It is designed for high-speed multi-threaded reliable copying to target destination, especially with long and peculiar file names that Windows Explorer has trouble copying. 
This particularly useful when back-up from old drives to external USB drive, in this example. Additionally, you can specify that file permission NOT be included when copying the files over so, any computer that uses the external harddrive can see those files.

This command worked well for me.

  1. Restartable mode (/Z) has to do with a partially-copied file. With this option, should the copy be interrupted while any particular file is partially copied, the next execution of Robocopy can pick up where it left off rather than re-copying the entire file. That option could be useful when copying very large files over a potentially unstable connection.
  2. Backup mode (/B) has to do with how Robocopy reads files from the source system. It allows the copying of files on which you might otherwise get an access denied error on either the file itself or while trying to copy the file's attributes/permissions. You do need to be running Command Prompt or Poweshell as Administrator context or otherwise have backup rights to use this flag.

This command works well and the /B swicth ignores file permissions. Make sure you understand the other switches, see below.

RoboCopy Command Line Syntax:

RoboCopy has a handy command line progress indicator too which comes useful while copying large files and will indicate what and which files failed to copy. Summary is excellent as well.
    Total    Copied   Skipped  Mismatch    FAILED    Extras
    Dirs :      318         0         0         0         0         0
    Files :     773         0         0         1         0         0

    Bytes :   2.158 g   2.158 g       0         0         0         0

    Times :   0:05:00   0:05:00    0:00:00   0:00:00   
0:00:00   0:00:00

    Speed :             7717714 Bytes/sec.

    Speed :             441.611 MegaBytes/min.

    Ended : Thur Feb 18 12:23:14 2016

Robocopy is built-in on the following Operating Systems: Windows 10, Windows 8, Windows 7, Windows Vista, Windows Server 2008 
Robocopy was available for free download with the Windows 2003 Resource Kit since Windows NT 4.0., Windows Server 2003, Windows XP, and Windows 2000 or Microsoft Windows NT version 4.0.

If you have a problem following command lines, then there's


2) RichCopy a utility with a GUI available from Microsoft MSDN Magazine.
This is an improvement and separate tool from Robocopy GUI.
Get RichCopy download  and the full MSDN Article about this is here. Help here.

RichCopy is a free utility that comes to us from Ken Tamaru of Microsoft. The tool was first developed in 2001. It too is multi-threaded will allow you to ignore file permissions.

Multi-threaded means that rather than copying one file at a time in serial order, RichCopy can open multiple threads simultaneously, allowing many files to be copied in parallel and cutting the total time required to complete the operation several times over. You can also pause and resume file copy operations, so if you lose network connectivity at any point, you can just pick up where you left off.

How to ignore file attributes (permissions) when copying
Firstly, choose Advanced














Choose Copy Options













Select 1) File attributes, Error Handling and then Unheck 2) File Attributes 





























Additionally, you can select which File attributes to set or File Attributes to remove. The tool is very extensive!  Tool comes with help file, but for reference Online help is here.

Richcopy errors with Path Too Long Issue

Richcopy just bombs out and closes when it runs into an errors such as path too long errors and permission errors.

3)  FastCopy 


FastCopy is free open source C project written by Shirouzu Hiroaki 

Touted as "The Fastest Copy/Delete Software on Windows."  and  "It supports UNICODE and over MAX_PATH (260 characters) file path names."


This means you can over come "paths too long" or "Source Path is too long" "Destination Path is too long"  or  "File cannot be copied" errors in most cases.

How? You can copy all you long paths to new location with shorter path.

However, this is only 1/4 of the solution. This does not solve the problem of the filename itself is too long, and your are still perpetuating this error.  You will still get these errors "The file name(s) would be too long for the source/destination folder", next time you copy. To correct these errors, see Path Tool Long Auto Fixer tool below.

4)  Path Too Long Auto Fixer 


Better still, get Path Tool Long Auto Fixer tool I build to solve this issue completely. It's the 1st tool of it's kind to find all directories and files that are too long and auto correct them!

It supports UNICODE as well and finds paths and fixes over the MAX_PATH (260 characters) limit.

Download free demo at https://pathtoolongautofixer.blogspot.com

Preview

Tuesday, January 19, 2016

OneDrive 2016 Direct File Download URL Maker







Microsoft OneDrive Direct File Download URL Maker




<iframe src="https://onedrive.live.com/embed?cid=8F99649728BEB2F3&resid=8F99649728BEB2F3%211010&authkey=AFo8ZQ_-qj84DEQ" width="98" height="120" frameborder="0" scrolling="no"></iframe>  see instructions below, if you don't know how. NOTE : For images there an extra step below.



https://onedrive.live.com/embed?cid=8F99649728BEB2F3&resid=8F99649728BEB2F3%211010&authkey=AFo8ZQ_-qj84DEQ and populate the textbox below, click "Get Download Link" button.



4. Click on Get Download Link button.
Textbox will be highlighted so you can copy the full link. To copy, right-click and choose  "Copy" or simply (ctrl-c) to copy link. Note: Entire URL is automatic selected for your convenience.





 


How to get a Microsoft OneDrive Embed Code (see instructions and images below)



  1. Goto OneDrive (https://onedrive.live.com/)
  2. Upload you file

  3. Right-click to "Embed" your uploaded file 

  4. Click Generate HTML Button.

  5. Copy and Paste HTML Code to Notepad

  6. Copy the all the embed code ie. <iframe src="embed link"... >...</iframe> and paste into textbox here



    Click Get embed link button to get the embed link and copy (ctrl-c).
  7. Paste (crtl-v) the file link into OneDrive Embed Link textbox above and click "Get Download Url" button. Proceed as usual.
  8. Right-click and "Copy" or simply press ctrl-c keys to copy the link to your clipboard.
  9. Now Paste (ctrl-v) the OneDrive Share Direct Download Link in emails to share!
  10. Done!

API Change for Images 



  1. Right-click to "Share" your uploaded file

  2. Pop-up will appear and choose "Get a link", click "Create link" dark blue button.
  3. Right-click and "Copy" the highlighted link.  Updated June 07, 2016 API change.
  4. You should get a similar "shortened" url as this

    https://1drv.ms/i/s!AvOyviiXZJmPlSc1CjtKuwc_gqVu

    Paste into http://www.linkexpander.com/ and copy that URL.


     
  5. Resulting url looks like this  https://onedrive.live.com/redir?resid=8F99649728BEB2F3!2727&authkey=!ADUKO0q7Bz-CpW4&ithint=photo%2cjpg
  6. Paste link into OneDrive Share Link textbox and click "Get Download Url" button.
  7. Right-click and choose "Select all" and "Copy".
  8. Paste the OneDrive Share Direct Download Link in emails instead.
  9. "Shorten link" was a feature in the old API windows now gone, June 07, 2016.  This is done by default now.

  10. OR for image only 
  1. Updated June 07, 2016 API change! Right-click Embed now gives you direct download URL! So you do not need to do the above! 
Google Chrome Warning: Very large PDF files do not preview in Chrome

PDF files approx. over 100Mb in size, do not preview in Chrome, and you get a splash page to "For the best experience, open this PDF portfolio in Adobe Acrobat or Adobe Reader"

You have to save the file first then open in Adobe Acrobat/Reader.







  • https://onedrive.live.com/redir?resid=8F99649728BEB2F3!2737&authkey=!ACnO8wuwLQ07PqI&v=3&ithint=photo%2cgif
It should look something like URL above and must contain the required file id (resid), authentication key (authkey) and file type (ithint). We'll use this link to get a direct file download.




 
OneDrive for Business File Share Link is the download link by default;)


Bonus : For images, read Using OneDrive as a Content Delivery Network (CDN)

Thursday, December 31, 2015

How to Save Outlook.com Emails to OneNote Online

Just noticed a new feature in Outlook.com that is really handy feature and that is the ability to save emails on Outlook.com directly to OneNote Online! 

Here's a beginners guide to saving Outlook.com emails to OneNote Online.

How to Save Outlook.com Emails to OneNote Online

In to Outlook.com select an email message, right-click it and select Save to OneNote.

Note: You cannot select multiple messages at a time to send to OneNote Online.








Or you can select highlight an email message and then choose ... in the command bar at top and Save to OneNote.



A pop-up box will ask save to a folder or "Section" in OneNote lingo, in this case emails.

Sections are organized into a "Notebook"s.



You can quick create a New Section "folder" by choosing a higher level "Notebook" to enable New Section button to be activated. Then select the newly created Section and click the Save button.

Note: You can add additional note:)



To verify it saved in OneNote, launch it from the apps icon, rubik's cube icon at the top right and click on OneNote Online. 



Open Notebook "Personal(Web)" and voila, it's been saved to OneNote Online!




This is a great feature to save emails such as coupons, bills and receipts as a back-up.

Save the best till last - Now you can share this email "Page" to anyone specifically.

You can now remove sensitive information as necessary as well, before sharing.


Share OneNote Section or "Page" to anyone, by right-click on it and getting Copy Link to this Page....



My assistant will love this.