I have been googling and reading for hours but I can't make this work..
I want to have a script which moves everything from my complete folder to my movies folder as soon as the files have processed
i made a batch file like this:
@echo on
cd C:\Documents and Settings\Administrator\My Documents\Downloads\complete
move *.* d:\movies\
pause
but it doesnt work, I have tried a lot of different combinations of this, but I always get 'syntax error' or such like
I've tried it with the directory string in inverted commas and allsorts
Please can someone highlight the very obvious mistake I must be making here?!?!
Thanks
[WINDOWS] How do I create a basic script?
Re: [WINDOWS] How do I create a basic script?
"cd C:\Documents and Setting.." won't work. Try it out on the command line and you will see it ...
Solution:
C:
cd \Documents and Setting...
As a rule of thumb: first try commands on the command line to see if it works. Then put it in a .BAT file, and run that from the command line. And only then run it from SAB.
Furthermore:
move *.* d:\movies\
... does that work? WIll it move subdirectories? I have no Windows so I can't check for you.
PS: moving to another directory can be done by SAB based on (default) category. Maybe easier.
Solution:
C:
cd \Documents and Setting...
As a rule of thumb: first try commands on the command line to see if it works. Then put it in a .BAT file, and run that from the command line. And only then run it from SAB.
Furthermore:
move *.* d:\movies\
... does that work? WIll it move subdirectories? I have no Windows so I can't check for you.
PS: moving to another directory can be done by SAB based on (default) category. Maybe easier.
Re: [WINDOWS] How do I create a basic script?
thanks for the reply
move *.* d:\movies\ - no, this doesnt work. none of it does.
i keep trying it on the command line, but i cant get it to run - i am stuck
move *.* d:\movies\ - no, this doesnt work. none of it does.
i keep trying it on the command line, but i cant get it to run - i am stuck
Re: [WINDOWS] How do I create a basic script?
Probably easier to create a Category and assign a destination directory to it ...
Re: [WINDOWS] How do I create a basic script?
Try this:
@echo on
C:
cd \Documents and Settings\Administrator\My Documents\Downloads\complete
XCOPY * /E /Y /C D:\movies\
DEL /S /Q *
RMDIR /S /Q .
See if that works. Should copy all the contents and then delete the files and subdirectories in your complete folder.
@echo on
C:
cd \Documents and Settings\Administrator\My Documents\Downloads\complete
XCOPY * /E /Y /C D:\movies\
DEL /S /Q *
RMDIR /S /Q .
See if that works. Should copy all the contents and then delete the files and subdirectories in your complete folder.
Re: [WINDOWS] How do I create a basic script?
Shouldn't that be?
xcopy /e /s /y
xcopy /e /s /y
Re: [WINDOWS] How do I create a basic script?
Hey shypike,
Correct me if I'm wrong but I think /E by itself is equivalent to using /E /S together.
Correct me if I'm wrong but I think /E by itself is equivalent to using /E /S together.
-
- Newbie
- Posts: 22
- Joined: August 4th, 2012, 8:35 pm
Re: [WINDOWS] How do I create a basic script?
To be safe I would use
@echo on
c:
cd "\Documents and Settings\Administrator\My Documents\Downloads\complete"
XCOPY * /E /Y /C D:\movies\
DEL /S /Q *
RMDIR /S /Q .
Using "" prevents issues with the spaces in the directory name. I see the first post indicates this was tried, so presumably the move was where the problem occurred, but I would leave the directory string in quotes and try the xcopy commands.
@echo on
c:
cd "\Documents and Settings\Administrator\My Documents\Downloads\complete"
XCOPY * /E /Y /C D:\movies\
DEL /S /Q *
RMDIR /S /Q .
Using "" prevents issues with the spaces in the directory name. I see the first post indicates this was tried, so presumably the move was where the problem occurred, but I would leave the directory string in quotes and try the xcopy commands.