What i meant:
Will the command CD folder be executed/interpreted different than when doing CD \folder or CD folder\?
and for batch:
Will IF EXIST folder\ be executed/interpreted different than IF EXIST \folder\ ?
Move/sort files to subfolders based on the file's date?
Moderator: DosItHelp
-
- Posts: 60
- Joined: 17 Mar 2012 09:59
Re: Move/sort files to subfolders based on the file's date?
When changing folders they can be relative to the current folder, or explicit with the full path.
For EG: if you are in c:\admin and there is a folder called c:\admin\work
then because you are in c:\admin already then you can execute
cd work
But if you are in c:\program files and need to change to c:\admin\work then you execute
cd \admin\work
or if you are in d: drive then you can execute
cd /d c:\admin\work
For EG: if you are in c:\admin and there is a folder called c:\admin\work
then because you are in c:\admin already then you can execute
cd work
But if you are in c:\program files and need to change to c:\admin\work then you execute
cd \admin\work
or if you are in d: drive then you can execute
cd /d c:\admin\work
Re: Move/sort files to subfolders based on the file's date?
©opy[it]®ight wrote:and for batch:
Will IF EXIST folder\ be executed/interpreted different than IF EXIST \folder\ ?
The trailing slash is needed because without one it can match a file as well.
Again your example raises the relative vs explicit path issue.
The first example will only check for "folder" in the current working directory.
-
- Posts: 60
- Joined: 17 Mar 2012 09:59
Re: Move/sort files to subfolders based on the file's date?
Oops, i didn't notice i had new replies. Thanks for clearing that up. It all makes sence to me now