<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>

CC BY-SA 4.0
2018-06-12T11:14:47.557Z
2018-06-12T11:14:47.557Z
Dan Cornilescu
<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>

CC BY-SA 4.0
2018-06-12T01:53:11.920Z
have you tried putting the filename in single or double quotes?
Prabhat
CC BY-SA 4.0
2018-06-12T02:58:30.827Z
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).
Dan Cornilescu
CC BY-SA 4.0
2018-06-12T03:00:11.780Z
Also: what "did not work" means exactly?
Dan Cornilescu
CC BY-SA 4.0
2018-06-12T06:31:34.247Z
Yes wildcarding the suspect character is working. Thanks @DanCornilescu
Prashast
<amazon-web-services><linux><amazon-s3>
Copying a file with special character & spaces
Prashast
# 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 @DanCornilescu  

---

## 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


---

