E eshai Registered User. Local time Today, 14:30 Joined Jul 14, 2015 Messages 195 Jan 1, 2019 #1 hi i have a db that take a snapshot to "c:\img" with extension of "jpg" there is only one file in the folder at a time the file saved each time with a different name how do i rename the file to "1.jpg"
hi i have a db that take a snapshot to "c:\img" with extension of "jpg" there is only one file in the folder at a time the file saved each time with a different name how do i rename the file to "1.jpg"
theDBguy I’m here to help Staff member Local time Today, 04:30 Joined Oct 29, 2018 Messages 22,624 Jan 1, 2019 #2 Hi, You can use the Dir() function to get the name of the file, so you can rename it.
June7 AWF VIP Local time Today, 03:30 Joined Mar 9, 2014 Messages 6,029 Jan 1, 2019 #3 This simple test worked for me: Name "C:\yourfolderpath\" & Dir("C:\yourfolderpath\") AS "C:\yourfolderpath\test.jpg" If you want to use part of the original name in the new name, will have to parse the file name returned by the Dir() function.
This simple test worked for me: Name "C:\yourfolderpath\" & Dir("C:\yourfolderpath\") AS "C:\yourfolderpath\test.jpg" If you want to use part of the original name in the new name, will have to parse the file name returned by the Dir() function.
E eshai Registered User. Local time Today, 14:30 Joined Jul 14, 2015 Messages 195 Jan 1, 2019 #4 theDBguy said: Hi, You can use the Dir() function to get the name of the file, so you can rename it. Click to expand... tnx i know but my head is to busy that i can't go over the dir function :banghead: need help writing the code
theDBguy said: Hi, You can use the Dir() function to get the name of the file, so you can rename it. Click to expand... tnx i know but my head is to busy that i can't go over the dir function :banghead: need help writing the code
E eshai Registered User. Local time Today, 14:30 Joined Jul 14, 2015 Messages 195 Jan 1, 2019 #5 June7 said: This simple test worked for me: Name "C:\yourfolderpath" & Dir("C:\yourfolderpath") AS "C:\yourfolderpath\test.jpg" If you want to use part of the original name in the new name, will have to parse the file name returned by the Dir() function. Click to expand... thank you that work perfect love you
June7 said: This simple test worked for me: Name "C:\yourfolderpath" & Dir("C:\yourfolderpath") AS "C:\yourfolderpath\test.jpg" If you want to use part of the original name in the new name, will have to parse the file name returned by the Dir() function. Click to expand... thank you that work perfect love you
theDBguy I’m here to help Staff member Local time Today, 04:30 Joined Oct 29, 2018 Messages 22,624 Jan 1, 2019 #6 Hi June7. Thanks for the assist.