|
| |||||||||
| Tags: batch file, directory, files, program, windows xp |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| Distinguishing between files and directories
Hello. I have a some files and directories that is been placed in the folder. The thing is that I have a folder in which two different directories been placed in the same. I want to make a batch file or any program that would allow me to differentiate between the directories and folders that is been placed. I use Windows Xp as my operating system. Please help me. Thank you |
|
#2
| ||||
| ||||
| Re: Distinguishing between files and directories
Well as you use windows xp as the operating system there is an alternative or a way through which you could differentiate between them. You do not need to write any bath file or code any program for the same. Its just that the extension makes the things possible for differentiating. The .txt kind of file gives a better example. As you can have a check for such files by looking whether they have a . in the name. |
|
#3
| |||
| |||
| Re: Distinguishing between files and directories
You could write a batch file or code the following in order to make the things necessary so that you can differentiate the directory and files. the following is the code: @echo OFF dir "C:\" if %errlvl% SQ 0 set errlvl=%errlvl% if errlvl 0 SET errlvl=0 echo errlvl = %errlvl% |
|
#4
| ||||
| ||||
| Re: Distinguishing between files and directories
In batch files there is nothing like looping structures. You cannot add if and else loop in batch files mode. This has to be taken into consideration that the commands depends on the flow of the structure of data. The end loop will throw an error without an exception. By default the end file is been executed in command mode. cmd.exe. This might help you i differentiating the files and directories in the root folder that you are monitoring. |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "Distinguishing between files and directories" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to transfer multiple files or directories | Saura | Technology & Internet | 5 | 07-03-2010 03:19 AM |
| How to run dos2unix recursively on all files except under .svn/ directories | Juaquine | Software Development | 4 | 09-02-2010 05:40 PM |
| Show all files directories alphabetically with PHP | Zaafir | Software Development | 4 | 19-06-2009 09:54 PM |
| List all Files and Directories in a Directory | Samir_1 | Software Development | 0 | 08-12-2008 07:32 PM |
| How to Secure NTFS files and directories | T.J. | Tips & Tweaks | 0 | 11-11-2008 02:26 PM |