Skip to content

Script doesn't work as expected with different directories #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
QuarkRobot opened this issue Jun 6, 2019 · 2 comments
Open

Script doesn't work as expected with different directories #1

QuarkRobot opened this issue Jun 6, 2019 · 2 comments

Comments

@QuarkRobot
Copy link

QuarkRobot commented Jun 6, 2019

If you run the script from a location not the same as the input and output, the archive created has the name of all directories in the path.

Example
Create a folder called SCRIPTS and place it on the Desktop with the tar.py script inside.
Open Command Prompt and type:

c:\users\bob\desktop\SCRIPTS\tar.py -autoexec c:\users\bob\desktop\thing c:\users\bob\desktop\test

This works, however, the name of each directory is added to the archive as you can see in the screenshot. The final directory specified (IE test) should be the 1st.
output

@Enichan
Copy link
Owner

Enichan commented Jun 10, 2019

I'll have to add a command line argument to specify what the root should be, but there is a workaround. Make sure the current working directory is:
c:\users\bob\desktop
Then execute:
C:\Python27\python.exe c:\users\bob\desktop\SCRIPTS\tar.py -autoexec c:\users\bob\desktop\thing test

@QuarkRobot
Copy link
Author

Cheers, Enichan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants