dos-path / un-dos-path compatibility with cygwin

Hello ;
I have a problem running some script on dos .

when i run :
C: ls /temp
ls: cannot access /temp: No such file or directory

but when i run
C: ls \temp
windriver backup remotebackup

also when i run
C: ls temp
windriver backup remotebackup

The problems that i have all developpers scripts was written first like this example ls /dir1 or cp /dir2 , we canno't change all scripts.

So i want to solve this problems to get these scripts running

please could you give to solve this problems .

Thanks

Mulder

hello ,
please have you any advices about this problems ,

ls /tmp
no such file or directory

ls \tmp
dir1 dir2 dir3

Thanks for your help,

have someone any idea or suggestions about compatibilities between (cygwin-path /) and (dos-path \)

thanks

There isn't a magic way to make the windows command prompt suddenly use / instead of \, it's a hardcoded thing that's been that way for 20 years. Windows understands both \ and /, but since / usually means commandline options, most windows commandline programs will refuse to accept a path that uses /'s.

If there are too many scripts to change by hand, you may wish to use automated tools like sed to convert / to \. Be careful to only convert the relevant forward-slashes.

The thing is

ls \temp or ls temp specify a relative path, ie search in the current directory for temp and list the items

ls /temp specifies an absolute path from the root! ie / so you are asking him a completely different thing. If you want the temp on your c drive, you need to specify /cygdrive/c/temp !!

Or, just do as Corona688 says, and push 'man sed' or man tr