Search found 178 matches
- 2022-Oct-20, 10:01 pm
- Forum: Windows CMD Shell
- Topic: Xcopy bug
- Replies: 3
- Views: 2879
Re: Xcopy bug
I don't think this is a bug, XCOPY just thinks you are trying to copy a file called C:\demo with no file extension. To tell it this is a directory, you need to add a trailing backslash. When using Robocopy there is no need for a trailing space because robocopy is centered around copying a whole dire...
- 2022-Oct-13, 6:12 pm
- Forum: Windows CMD Shell
- Topic: Execution depends on what comes AFTER the line in question????????
- Replies: 4
- Views: 3181
Re: Execution depends on what comes AFTER the line in question????????
I think the problem here is that your filename includes a close parenthesis ')'
Unless enclosed in quotes, the CMD shell is not clever enough to realise that is part of the filename and instead acts like you are closing the parenthesis opened a couple of lines above.
Unless enclosed in quotes, the CMD shell is not clever enough to realise that is part of the filename and instead acts like you are closing the parenthesis opened a couple of lines above.
- 2022-Sep-17, 8:27 am
- Forum: Windows CMD Shell
- Topic: FOR parameters
- Replies: 4
- Views: 3714
Re: FOR parameters
If you are testing the snippet at the command line, you will need to change the %%f to just %f
- 2022-Sep-15, 4:49 pm
- Forum: Windows CMD Shell
- Topic: FOR parameters
- Replies: 4
- Views: 3714
Re: FOR parameters
To troubleshoot this you could try putting an ECHO before the "C:\Program Files\7-Zip\7z.exe"
so you can see what it is passing to 7z.
I don't think you need that asterisk after the "F:\client_1\"
so you can see what it is passing to 7z.
I don't think you need that asterisk after the "F:\client_1\"
- 2022-Sep-14, 4:47 pm
- Forum: Windows CMD Shell
- Topic: Runas example for running dsa.msc as a different user doesn't seem to work
- Replies: 3
- Views: 2463
Re: Runas example for running dsa.msc as a different user doesn't seem to work
It could be that MMC.exe is relaunching as either a 32 or 64 bit process
https://docs.microsoft.com/en-us/previo ... 3(v=vs.85)
https://docs.microsoft.com/en-us/previo ... 3(v=vs.85)
- 2022-Sep-14, 4:42 pm
- Forum: Windows CMD Shell
- Topic: Runas example for running dsa.msc as a different user doesn't seem to work
- Replies: 3
- Views: 2463
Re: Runas example for running dsa.msc as a different user doesn't seem to work
Thanks, I have added that to the RUNAS example now, I don't know why the START is needed, perhaps someone else can explain it?
- 2022-Sep-11, 9:01 am
- Forum: Windows CMD Shell
- Topic: Robocopy /IM
- Replies: 2
- Views: 3718
Re: Robocopy /IM
@workablob, from your email address it looks very much like you may in fact be David Kendrick the author of copyrite xp and you have been spamming this identical message around multiple IT forums which mention robocopy, it is not a good look. Also the website for copyrite xp is currently down, so ma...
- 2022-Aug-19, 1:17 pm
- Forum: Windows CMD Shell
- Topic: How do I check the length of a filename in batch script?
- Replies: 1
- Views: 8704
Re: How do I check the length of a filename in batch script?
Assuming you have the full path/filename, then use Parameter Extensions to split out just the filename, or filename+extension.
Then to get the length use Strlen
Then to get the length use Strlen
- 2022-Aug-05, 2:50 pm
- Forum: Windows CMD Shell
- Topic: How to replace all characters in a variable with another character?
- Replies: 2
- Views: 2713
Re: How to replace all characters in a variable with another character?
If this is to represent a password, it is worth considering do you really need to represent the right number of characters? Hiding the length of a password is generally good security, then you can just display a fixed line of *******'s OTOH if this is something like a username or email address, then...
- 2022-Jul-20, 7:14 pm
- Forum: Windows CMD Shell
- Topic: Double Quotes embedded in Double Quotes
- Replies: 3
- Views: 2000
Re: Double Quotes embedded in Double Quotes
OK that's done, I also added a couple of alternatives