Answers: <p>Note that the suspect filename character may not actually be <code>?</code>, that could be just a filename displaying artifact if your system somehow doesn't properly display that character. BTW, <code>R?glement</code> sounds awfully close to the French <code>Règlement</code>.</p>
  
  <p>One possible approach to accessing those files without worrying too much about typing in those characters or escaping them would be to try to wildcard them instead. In your case try something along these lines (use a more specific pattern if there are other files matching this one besides the 2 files of interest):</p>
  
  <pre><code>aws s3 sync R*glement*pdf s3://bucket_name/raw_files/ --sse
  </code></pre>
  
Answers: CC BY-SA 4.0
Answers: 2018-06-12T11:14:47.557Z
Answers: 2018-06-12T11:14:47.557Z
Answers: Dan Cornilescu
Body: <p>I have been trying to copy a file from my remote server to AWS s3, but the file name is quite weird and I am not able to figure it out what can I do. I tried using escape characters but that did not work.
  Filenames:-</p>
  
  <pre><code># R?glement de zzzzzxxxxx v1.0 #.pdf 
  # R?glement de xxxxxyyyyy v1.0 #.docx
  </code></pre>
  
  <p>My locale is like this :- </p>
  
  <pre><code>LANG=en_US.UTF-8
  LC_CTYPE="en_US.UTF-8"
  LC_NUMERIC="en_US.UTF-8"
  LC_TIME="en_US.UTF-8"
  LC_COLLATE="en_US.UTF-8"
  LC_MONETARY="en_US.UTF-8"
  LC_MESSAGES="en_US.UTF-8"
  LC_PAPER="en_US.UTF-8"
  LC_NAME="en_US.UTF-8"
  LC_ADDRESS="en_US.UTF-8"
  LC_TELEPHONE="en_US.UTF-8"
  LC_MEASUREMENT="en_US.UTF-8"
  LC_IDENTIFICATION="en_US.UTF-8"
  LC_ALL=
  </code></pre>
  
  <p>I am using below command </p>
  
  <pre><code>aws s3 sync file_name s3://bucket_name/raw_files/ --sse
  </code></pre>
  
  <p>Please suggest</p>
  
Comments: CC BY-SA 4.0
Comments: 2018-06-12T01:53:11.920Z
Comments: have you tried putting the filename in single or double quotes?
Comments: Prabhat
Comments: CC BY-SA 4.0
Comments: 2018-06-12T02:58:30.827Z
Comments: Note that the suspect filename character may not actually be `?`, that could be just a filename displaying artifact if your system somehow doesn't propery display that character. BTW, `R?glement` sounds awfully close to the French `Règlement`. Try wilcarding the suspect chars: `aws s3 sync R*glement*pdf s3://bucket_name/raw_files/ --sse` (or use a more specific pattern if there are other files matching this one besides the 2 files of interest).
Comments: Dan Cornilescu
Comments: CC BY-SA 4.0
Comments: 2018-06-12T03:00:11.780Z
Comments: Also: what "did not work" means exactly?
Comments: Dan Cornilescu
Comments: CC BY-SA 4.0
Comments: 2018-06-12T06:31:34.247Z
Comments: Yes wildcarding the suspect character is working. Thanks @DanCornilescu
Comments: Prashast
Tags: <amazon-web-services><linux><amazon-s3>
Title: Copying a file with special character & spaces
UserDisplayName: Prashast
ThreadText: # Copying a file with special character & spaces
  
  (Asked by: username_0 on 2018-06-11)
  
  I have been trying to copy a file from my remote server to AWS s3, but the file name is quite weird and I am not able to figure it out what can I do. I tried using escape characters but that did not work.
  Filenames:-
  
  ```
  # R?glement de zzzzzxxxxx v1.0 #.pdf 
  # R?glement de xxxxxyyyyy v1.0 #.docx
  
  ```
  
  My locale is like this :-
  
  ```
  LANG=en_US.UTF-8
  LC_CTYPE="en_US.UTF-8"
  LC_NUMERIC="en_US.UTF-8"
  LC_TIME="en_US.UTF-8"
  LC_COLLATE="en_US.UTF-8"
  LC_MONETARY="en_US.UTF-8"
  LC_MESSAGES="en_US.UTF-8"
  LC_PAPER="en_US.UTF-8"
  LC_NAME="en_US.UTF-8"
  LC_ADDRESS="en_US.UTF-8"
  LC_TELEPHONE="en_US.UTF-8"
  LC_MEASUREMENT="en_US.UTF-8"
  LC_IDENTIFICATION="en_US.UTF-8"
  LC_ALL=
  
  ```
  
  I am using below command
  
  ```
  aws s3 sync file_name s3://bucket_name/raw_files/ --sse
  
  ```
  
  Please suggest
  
  **Tags:** amazon-web-services, linux, amazon-s3
  
  > **Comments:**
  > **username_1**: have you tried putting the filename in single or double quotes?  
  > **username_2**: Note that the suspect filename character may not actually be `?`, that could be just a filename displaying artifact if your system somehow doesn't propery display that character. BTW, `R?glement` sounds awfully close to the French `Règlement`. Try wilcarding the suspect chars: `aws s3 sync R*glement*pdf s3://bucket_name/raw_files/ --sse` (or use a more specific pattern if there are other files matching this one besides the 2 files of interest).  
  > **username_2**: Also: what "did not work" means exactly?  
  > **username_0**: Yes wildcarding the suspect character is working. Thanks @username_2  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2018-06-12. Score: 0 | Accepted answer
  
  Note that the suspect filename character may not actually be `?`, that could be just a filename displaying artifact if your system somehow doesn't properly display that character. BTW, `R?glement` sounds awfully close to the French `Règlement`.
  
  One possible approach to accessing those files without worrying too much about typing in those characters or escaping them would be to try to wildcard them instead. In your case try something along these lines (use a more specific pattern if there are other files matching this one besides the 2 files of interest):
  
  ```
  aws s3 sync R*glement*pdf s3://bucket_name/raw_files/ --sse
  
  ```
  
  
  ---
  
  