1.

Solve : copy and rename file with path name?

Answer»

Hi Foxidrive
sorry I didn't look at first sight and replied.
thanks for that, I checked it and changed it 3 different versions as per requirement before I saw you reply.
I have a question again
As I asked for advise before is there any such kind of thing if you don't KNOW DOS and C++ you can't leran/Understand VB very well (as my 2 friends advised)
my KNOWLEDGE of DOS is very of few basic commands which I learned 15 years before in school.
I want to learn VBA to automate few task in SOFTWARES like excel and many other applications which has customisation thru VBA so we can automate our daily tasks.
what's your advise as per your experience should I spend time learning DOS and C++ or VBA we can learn without learning these.I haven't used VBA so I can't GIVE an informed opinion.
another problem that I noticed was that you can't change drives with 'cd'

so change 'cd %1' to
Code: [Select]%~d1
cd %1

this should put you in the write directory. You can add 'cd' to a third line and it will echo the current directory for you to double check if you want.Quote from: Lemonilla on June 29, 2013, 08:34:25 AM

another problem that I noticed was that you can't change drives with 'cd'

You can use the cd command to change to a folder on another drive if you use the /d switch. I always use that switch after cd, it has no effect if the new folder is on the same drive.

you are in c:\test, you want to go to D:\pictures\holidays you do this: cd /d D:\pictures\holidays, it is the same as doing first D: and then cd pictures/holidays.
Quote from: Salmon Trout on June 29, 2013, 09:01:33 AM
I always use that switch after cd, it has no effect if the new folder is on the same drive.

That means, more clearly, the /d switch does no harm if the new folder is on the same drive. Quote from: Lemonilla on June 29, 2013, 08:34:25 AM
another problem that I noticed was that you can't change drives with 'cd'

so change 'cd %1' to
Code: [Select]%~d1
cd %1

this should put you in the write directory. You can add 'cd' to a third line and it will echo the current directory for you to double check if you want.
That was the point of my previous post and told you to read the help for that command. You were not using the correct syntax.Quote from: Squashman on June 29, 2013, 12:53:47 PM
That was the point of my previous post and told you to read the help for that command. You were not using the correct syntax.
My APOLOGIES, I missed your earlier post. Thank you for pointing it out, could come in handy.


Discussion

No Comment Found