Change directory

ruslan_baratov's Avatar

ruslan_baratov

21 Feb, 2014 05:50 AM

How can I change current directory?
Example:

echo %CD%
C:\projects\appveyor-test
cd _builds
echo %CD%
C:\projects\appveyor-test
  1. Support Staff 1 Posted by Feodor Fitsner on 21 Feb, 2014 07:20 AM

    Feodor Fitsner's Avatar

    Try selecting "PS" when configuring script. The main build session is PowerShell session, but "CMD" scripts run as a separate batches that do not affect "parent" session.

  2. 2 Posted by ruslan_baratov on 22 Feb, 2014 05:54 AM

    ruslan_baratov's Avatar

    Now I can't find my build logs (: I only see error message 'Specify a project or solution file. The directory does not contain a project or solution file' but I have both 'build_script' and 'test_script' as custom steps.

  3. Support Staff 3 Posted by Feodor Fitsner on 22 Feb, 2014 06:01 AM

    Feodor Fitsner's Avatar

    Are you configuring project through appveyor.yml? Can you post it?

  4. 4 Posted by ruslan_baratov on 22 Feb, 2014 06:11 AM

    ruslan_baratov's Avatar

    Sure:

    build_script:
      - echo %CD%
      - mkdir foo
      - echo %CD%
      - ps: cd foo
      - echo %CD%
      - cmake -H. -B_builds
      - cmake --build _builds
    
    test_script:
      - echo %CD%
      - ps: cd _builds
      - echo %CD%
      - ctest -VV
      - echo %CD%
    

    BTW the whole project:
    https://github.com/forexample/appveyor-test

  5. Support Staff 5 Posted by Feodor Fitsner on 22 Feb, 2014 06:18 AM

    Feodor Fitsner's Avatar

    Thanks, I will take a look. Could you please post Appveyor project URL?

  6. 6 Posted by ruslan_baratov on 22 Feb, 2014 06:31 AM

    ruslan_baratov's Avatar
  7. Support Staff 7 Posted by Feodor Fitsner on 22 Feb, 2014 06:40 AM

    Feodor Fitsner's Avatar

    Hm, I thought it's AppVeyor 2.0 beta. appveyor.yml is supported in beta only: blog.appveyor.com/2014/02/19/appveyor-20-dedicated-build-vms-parallel-testing-nuget-deployment/

    Could you please try running your project on beta?

  8. 8 Posted by ruslan_baratov on 22 Feb, 2014 06:59 AM

    ruslan_baratov's Avatar

    Hah (: Didn't notice that, sorry.

    'cd' with 'ps' works fine. Thank you!

  9. Support Staff 9 Posted by Feodor Fitsner on 22 Feb, 2014 07:25 AM

    Feodor Fitsner's Avatar

    Cool! Let me know if you find anything else.

  10. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:38 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

 

26 Sep, 2024 03:49 PM
26 Sep, 2024 09:02 AM
25 Sep, 2024 07:07 PM
24 Sep, 2024 08:39 PM
24 Sep, 2024 06:47 AM
20 Sep, 2024 05:50 PM