Cynosure.X International LLC


Add Comment | Related Links | TrackBack
Related Content

Windows Path To Cygdrive (GPL)

"Windows Path To Cygdrive.cmd" is a Windows batch program that helps you convert Windows path to cygdrive (Cygwin) path. Many UNIX utilities (e.g. rsync) that are ported to Windows using Cygwin requires the cygdrive path, rather than the Windows path. This script allows you to set a global path variable once and use it everyone. See examples below for details.

"Windows Path To Cygdrive.cmd" takes advantage of the SetNumberOfArguments.bat (GPL) script that is available on this web site. So to use "Windows Path To Cygdrive.cmd", you'll have to download SetNumberOfArguments.bat, if you don't already have it.

"Windows Path To Cygdrive.cmd" is distributed as executable source code under the GNU General Public License. Please see the license agreement elsewhere on this site.


  "Windows Path To Cygdrive.cmd" "path"

Usage Examples

  >"Windows Path To Cygdrive.cmd" "%UserProfile%"

>"Windows Path To Cygdrive.cmd" "%ProgramFiles%"
/cygdrive/C/Program Files

>"Windows Path To Cygdrive.cmd" "%ProgramFiles(x86)%"
/cygdrive/C/Program Files (x86)

Programming Examples

  set photoPath=%UserProfile%\Desktop\Travel Photos

call SetVariableToOutput.bat ""Windows Path To Cygdrive.cmd" "%photoPath%""
set cygPath=%OutputVariable%

if exist "%photoPath%" (
rsync -auv --delete-during "%cygPath%/" "%serverPath%/"

In the example above, %photoPath% is only declared once. It is converted into the %cygPath% with this script. The example checks to ensure %photoPath" exists, while using %cygPath% for rsync.

Attached File: Windows Path To Cygdrive.cmd (629 B)

Chieh Cheng
Sun, 16 Mar 2014 09:36:37 +0300

Add Comment | Related Links | TrackBack
Related Content

Did your message disappear? Read the Forums FAQ.

Add Comment

Spam Control | * indicates required field
Your Name: *
Remember Me!
Comment: *
File attachment is optional. Please do not attach a file to your submission unless it is relevent.
Attach File:
(20 MB Max)
Spam Protection: * Answer of 6 + 5?
Click button only once, please!


TrackBack only accepted from WebSite-X Suite web sites. Do not submit TrackBacks from other sites.

Send Ping | TrackBack URL | Spam Control

No TrackBacks yet. TrackBack can be used to link this thread to your weblog, or link your weblog to this thread. In addition, TrackBack can be used as a form of remote commenting. Rather than posting the comment directly on this thread, you can posts it on your own weblog. Then have your weblog sends a TrackBack ping to the TrackBack URL, so that your post would show up here.

Messages, files, and images copyright by respective owners.

Products | Services
Forums | Latest | RSS
Library | Search | Wiki
Help | Licenses

Login | Register

67 Users Online

Hacking Digital Cameras
Fun for Photographers

Amazon Associate

Copyright © 1996 - 2024. All Rights Reserved.