-3

I searched everywhere over google and there doesn't seem to be any solution. Xcopy, copy, robocopy, parsing as literal string via variable, wildcard characters..

copy C:\soulworker\datas\bin\Table\nf2\data12.v   C:\soulworker\datas\=true_english\

for /R C:\soulworker\datas\bin\Table\nf2\English\ %%f in (*.res) do copy %%f  C:\soulworker\datas\bin\Table\nf2\data12.zip\..\bin\Table\
Emi
  • 7
  • 5
  • It's not possible for `..` to be part of a file path; `..` is a special directory that is built in to every directory and directs to the directory above it. – SomethingDark Apr 25 '16 at 02:56
  • Not sure why I'm downvoted for asking a valid question, but it is part of a zip file directory that I extracted. https://i.snag.gy/jAIKnO.jpg https://i.snag.gy/AMxC7O.jpg – Emi Apr 25 '16 at 03:03
  • That's not the extracted path; the extracted path won't have `.zip` anywhere in it. You've mistakenly taken the path from _inside_ the zip file. Don't do that. – SomethingDark Apr 25 '16 at 03:06
  • Alright my bad, however there is absolutely no way to automate this because it is an invalid file path (as a .bat file) besides overwriting the files manually by opening it as a zip (?). – Emi Apr 25 '16 at 03:09
  • Also, it's not working because your `for` loop is trying to copy files from a directory and put them inside of a zip file. That will never ever work. See http://stackoverflow.com/questions/28043589/how-can-i-compress-zip-and-uncompress-unzip-files-and-folders-with-bat to create zip files. – SomethingDark Apr 25 '16 at 03:11
  • It must follow this exact format in order to be repacked using a xor55 repacker; I looked a little into the link- will it allow me to recreate this zip file with the ... structure \..\bin\Table\? – Emi Apr 25 '16 at 03:16
  • Perhaps people downvoted because they miss a question in your post (you know, a sentence with a question mark at the end); you don't state what is going wrong with your code or if an error message appears, you don't even tell what you want to achieve; all this was enough reason for me to downvote... – aschipfl Apr 25 '16 at 19:00

1 Answers1

1

On = Equals Sign in path or file name, read cmd Syntax: Escape Characters, Delimiters and Quotes:

Delimiters

Delimiters separate one parameter from the next - they split the command line up into words.

Parameters are most often separated by spaces, but any of the following are also valid delimiters:

  • Comma (,)
  • Semicolon (;)
  • Equals (=)
  • Space ( )
  • Tab ( )

To keep a delimiter in file or path name, use double quotes as follows:

copy C:\soulworker\datas\bin\Table\nf2\data12.v "C:\soulworker\datas\=true_english\"

On using .. doubled Full Stop, read Naming Files, Paths, and Namespaces:

Use two consecutive periods (..) as a directory component in a path to represent the parent of the current directory.

For instance, all

dir C:\soulworker\datas\bin\Table\nf2\data12.zip\..\bin\Table\
dir C:\soulworker\datas\bin\Table\nf2\data12Xzip\..\bin\Table\
dir C:\soulworker\datas\bin\Table\nf2\foobar.exe\..\bin\Table\
dir C:\soulworker\datas\bin\Table\nf2\foobarABCD\..\bin\Table\    

would resolve to

dir C:\soulworker\datas\bin\Table\nf2\bin\Table\

even if skipped directory component in a path contains inadmissible characters e.g. * (asterisk), ? (question mark) or : (colon), see next example:

==> dir /B /S c:\windows\foo***...???:::\..\system32\notepad.exe
c:\windows\system32\notepad.exe

==>

The \foo***...???::: path part (preceding \..) is not parsed at all…

JosefZ
  • 28,460
  • 5
  • 44
  • 83