locked
SS.exe not able to find the file | Getting Error "is not an existing filename or project"

    Question

  • Hi all,
            Here is the small batch script i'm trying to run to get a version 4 file from VSS-

    set SSDIR=\\Project_Server\VSS
    set SSUSER=User1
    "C:\Program Files\win32\ss.exe"  cp $/"Project1"
    "C:\Program Files\win32\ss.exe" GET "$/Project1/testfile.txt -V4"

    Whenever i execute the script, i get the following error message-
    $/Project1/testfile.txt -V4 is not an existing filename or project

    I tried to run the command indivudually but i still get the same error. I logged into VSS and confirmed that the file exists and the database name is also correct, but i'm still not able to get the file.

    Can someone please let me know what should i change in the script so that it starts working.
    Thursday, January 28, 2010 5:22 PM

Answers

  • If the path of the file "testfile.txt" is $/"Project1/test/abc/testfile.txt", you should set "$/Project1/test/abc" as the current project certainly. I mistakenly thought the path was "$/"Project1/testfile.txt".

    If you want to use variables in you commands, you should use the "set" command to define the variable name and value and use the variable with "%[VariableName]%" format. Try the following commands:

    set SSUSER=User1
    set $variable1 = "testfile.txt"
    "C:\Program Files\win32\ss.exe" cp $/"Project1/test/abc"
    "C:\Program Files\win32\ss.exe" GET %$variable1% -V4

    _____________________
    April
    My Free Live Chat Software for you.
    Wednesday, February 03, 2010 7:11 AM

All replies

  • ## "C:\Program Files\win32\ss.exe" GET "$/Project1/testfile.txt -V4"
    In the get command, you can not put the file path and version together in one quotation because ss.exe will regard ""$/Project1/testfile.txt -V4" as the file name.

    In fact, you have already set "$/"Project1" to the current project with "cp" command, so you can use file name "testfile.txt" instead of file full name "$/Project1/testfile.txt".

    I give my commands as follows:

    set SSDIR=\\Project_Server\VSS
    set SSUSER=User1
    "C:\Program Files\win32\ss.exe" cp $/"Project1"
    "C:\Program Files\win32\ss.exe" GET testfile.txt -V4

    ______________________
    April
    My Free Live Chat Software for you.
    Sunday, January 31, 2010 2:18 AM
  • Hi April,
               Thanks a lot for your reply. I did try this but i'm getting the same result -

    set SSDIR=\\Project_Server\VSS
    set SSUSER=User1
    "C:\Program Files\win32\ss.exe"  cp $/"Project1"
    "C:\Program Files\win32\ss.exe" GET testfile.txt -V4

    Whenever i execute the script, i get the following error message-
    $/Project1/testfile.txt -V4 is not an existing filename or project


    BUT, when i give the complete path, it some how takes it , so when i execute the following-

    set SSUSER=User1
    "C:\Program Files\win32\ss.exe"  cp $/"Project1/test/abc"
    "C:\Program Files\win32\ss.exe" GET testfile.txt -V4
    By running this command, it gets the file and puts it in the working folder

    Now, when i run it using a variablke, it doens't run at atll !!!!

    set SSUSER=User1
    $variable1 = "testfile.txt"
    "C:\Program Files\win32\ss.exe"  cp $/"Project1/test/abc"
    "C:\Program Files\win32\ss.exe" GET $variable1 -V4
    IT DOES NOT RUN with this command

    I'll really appreciate if someone can help me create this script.


    Monday, February 01, 2010 4:37 PM
  • Hi April,

    You may take a look at the batch code here:

    Thanks,


    Catherine Sea
    Version Control Software | Software Configuration Management Solution

    Tuesday, February 02, 2010 3:22 AM
  • If the path of the file "testfile.txt" is $/"Project1/test/abc/testfile.txt", you should set "$/Project1/test/abc" as the current project certainly. I mistakenly thought the path was "$/"Project1/testfile.txt".

    If you want to use variables in you commands, you should use the "set" command to define the variable name and value and use the variable with "%[VariableName]%" format. Try the following commands:

    set SSUSER=User1
    set $variable1 = "testfile.txt"
    "C:\Program Files\win32\ss.exe" cp $/"Project1/test/abc"
    "C:\Program Files\win32\ss.exe" GET %$variable1% -V4

    _____________________
    April
    My Free Live Chat Software for you.
    Wednesday, February 03, 2010 7:11 AM