Error with changing directory - No such file or directory
Matthew Woehlke
mw_triad@users.sourceforge.net
Mon Apr 2 22:59:00 GMT 2007
Ben Wylie wrote:
> I have a batch file which runs bash and calls a bash script.
>
> My batch file reads:
> cd F:\cygwin\bin
> bash --login -i deletescript.sh F:/Progra~1/NAVIEG/queues/
>
> The bash script is:
>
> #!/bin/bash
> cd $1
> F:/cygwin/bin/find . -type f -exec awk '(/various/ || /search/ ||
> /keywords/) {print FILENAME}' {} \; | xargs rm
>
> When I run the batch file I get:
>
> F:\>cd F:\cygwin\bin
>
> F:\cygwin\bin>bash --login -i deletescript.sh F:/Progra~1/NAVIEG/queues/
> : No such file or directoryine 2: cd: F:/Progra~1/NAVIEG/queues/
>
> It doesn't seem to like the "cd F:/Progra~1/NAVIEG/queues/"
>
> However if I load cygwin and type the commands directly, it all works fine.
>
> Administrator@server ~
> $ cd F:/Progra~1/NAVIEG/queues/
>
> [snip]
Hmm, it seems you are not using the version of Cygwin that smacks you
over the head with a wet tuna for doing such a thing (is that a feature
in the Vista-only 1.7.0?). Try using POSIX paths instead of DOS-style
paths, and see if that fixes it.
--
Matthew
Vs lbh pna ernq guvf jvgubhg fbsgjner, lbh ner n FREVBHF areq! --
Nqncgrq sebz Znggurj Jva (ivz-qri znvyvat yvfg)
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list