Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7708683
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T00:40:28+00:00 2026-06-01T00:40:28+00:00

We have a process that I’m trying to automate in which I have to

  • 0

We have a process that I’m trying to automate in which I have to check generated output files into perforce. I understand this is far from ideal, but it’s not something I can really get around. In order to ensure all generated files get into perforce I have to check an entire directory into perforce. According to perforce’s documentation in their knowledge base there’s a rather goofy looking but valid command you can run:

dir /s /b /a-d | p4 -x - add

Everything appears at first to run fine when you execute this, for each filename with an apostrophe (single quote?) I get a message saying

filename – missing, assuming text.

This despite the fact that my list of files to add was generated by dir. In otherwords, it should be impossible (barring perhaps another process interfering) for one of these files to be missing since it is the list of files in the dir.

If I try to submit the resulting changelist, submission fails when it cannot find the missing file(s). I’ve tried a couple of longshot things like redirecting the dir output into a file and then reading the arguments for add from that file, but it worked just the same.

Perhaps the craziest part of all of this is that I’ve discovered is that

p4 add Jim's_File.txt

works if I use tab complete, but fails if I type, paste, or pipe the name. I have no clue how to work around this behavior, but would really love some ideas.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T00:40:30+00:00Added an answer on June 1, 2026 at 12:40 am

    Works for me:

    Created a file named a’file.txt

    c:\some_path>p4 add a'file.txt
    //source/path-in-depot/a'file.txt#1 - opened for add
    

    Perhaps you should mention your Perforce version and operating system.

    Generally speaking, it’s best to wrap each filename in quotes ("a'file.txt") or, in Windows shell, use the ^ symbol to escape any characters that have special meaning.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a process that I need to make into a service. This process
I have a process that get killed immediately after executing the program. This is
I have a process that starts a transaction, inserts a record into Table1, and
I have a process that uses a lot of memory mapped files. Problem is
I have a process that sends to printer a large amount of .doc files
I have a process that I am automating into a kind of GUI step
I have a process that's writing a lot of data to stdout, which I'm
I have a process that's going to initially generate 3-4 million PDF files, and
I have a process that modifies icons on files with an overlay. The Finder,
I have a process that gets a files from a directory and puts them

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.